Skip to content

Commit 50b3d4d

Browse files
shiwuYanyan-Wang
shiwu
authored andcommitted
fix: update edge to be horizontal and the label is on wrong position;
1 parent 94b98ee commit 50b3d4d

File tree

11 files changed

+25
-21
lines changed

11 files changed

+25
-21
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ChangeLog
22

3+
#### 4.3.7
4+
5+
- fix: update edge to be horizontal and the label is on wrong position;
6+
37
#### 4.3.6
48

59
- fix: drag-node on mobile, closes: #3127;

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-core",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",

packages/core/src/element/shapeBase.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export const shapeBase: ShapeOptions = {
298298
delete labelStyle.rotate;
299299

300300
// 计算 label 的旋转矩阵
301-
if (rotate) {
301+
if (rotate || rotate === 0) {
302302
// if G 4.x define the rotateAtStart, use it directly instead of using the following codes
303303
let rotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];
304304
rotateMatrix = transform(rotateMatrix, [
@@ -328,7 +328,7 @@ export const shapeBase: ShapeOptions = {
328328
);
329329
const labelBgStyle = { ...calculateBgStyle, ...cfgBgStyle };
330330
labelBg.resetMatrix();
331-
if (rotate) {
331+
if (rotate || rotate === 0) {
332332
let bgRotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];
333333
bgRotateMatrix = transform(bgRotateMatrix, [
334334
['t', -labelBgStyle.x, -labelBgStyle.y],

packages/core/src/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const colorSet = {
6464
};
6565

6666
export default {
67-
version: '0.3.6',
67+
version: '0.3.7',
6868
rootContainerClassName: 'root-container',
6969
nodeContainerClassName: 'node-container',
7070
edgeContainerClassName: 'edge-container',

packages/element/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-element",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",
@@ -61,7 +61,7 @@
6161
},
6262
"dependencies": {
6363
"@antv/g-base": "^0.5.1",
64-
"@antv/g6-core": "0.3.6",
64+
"@antv/g6-core": "0.3.7",
6565
"@antv/util": "~2.0.5"
6666
},
6767
"devDependencies": {
@@ -87,6 +87,6 @@
8787
"ts-jest": "^24.1.0",
8888
"ts-loader": "^7.0.3",
8989
"typescript": "^3.9.5",
90-
"@antv/g6": "4.3.6"
90+
"@antv/g6": "4.3.7"
9191
}
9292
}

packages/g6/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6",
3-
"version": "4.3.6",
3+
"version": "4.3.7",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",
@@ -66,7 +66,7 @@
6666
]
6767
},
6868
"dependencies": {
69-
"@antv/g6-pc": "0.3.6"
69+
"@antv/g6-pc": "0.3.7"
7070
},
7171
"devDependencies": {
7272
"@babel/core": "^7.7.7",

packages/g6/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import G6 from '@antv/g6-pc';
22

3-
G6.version = '4.3.6';
3+
G6.version = '4.3.7';
44

55
export * from '@antv/g6-pc';
66
export default G6;
7-
export const version = '4.3.6';
7+
export const version = '4.3.7';

packages/pc/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-pc",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",
@@ -74,9 +74,9 @@
7474
"@antv/g-canvas": "^0.5.2",
7575
"@antv/g-math": "^0.1.1",
7676
"@antv/g-svg": "^0.5.1",
77-
"@antv/g6-core": "0.3.6",
78-
"@antv/g6-plugin": "0.3.6",
79-
"@antv/g6-element": "0.3.6",
77+
"@antv/g6-core": "0.3.7",
78+
"@antv/g6-plugin": "0.3.7",
79+
"@antv/g6-element": "0.3.7",
8080
"@antv/algorithm": "^0.1.8",
8181
"@antv/hierarchy": "^0.6.7",
8282
"@antv/layout": "^0.1.14",

packages/pc/src/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const textColor = 'rgb(0, 0, 0)';
77
const colorSet = getColorsWithSubjectColor(subjectColor, backColor);
88

99
export default {
10-
version: '0.3.6',
10+
version: '0.3.7',
1111
rootContainerClassName: 'root-container',
1212
nodeContainerClassName: 'node-container',
1313
edgeContainerClassName: 'edge-container',

packages/plugin/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-plugin",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "G6 Plugin",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -22,7 +22,7 @@
2222
"@antv/g-base": "^0.5.1",
2323
"@antv/g-canvas": "^0.5.2",
2424
"@antv/g-svg": "^0.5.2",
25-
"@antv/g6-core": "0.3.6",
25+
"@antv/g6-core": "0.3.7",
2626
"@antv/matrix-util": "^3.0.4",
2727
"@antv/scale": "^0.3.4",
2828
"@antv/util": "^2.0.9",
@@ -57,6 +57,6 @@
5757
"jquery": "^3.5.1",
5858
"rimraf": "^3.0.2",
5959
"ts-jest": "^26.4.4",
60-
"@antv/g6": "4.3.6"
60+
"@antv/g6": "4.3.7"
6161
}
6262
}

packages/site/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@antv/g6-site",
4-
"version": "4.3.6",
4+
"version": "4.3.7",
55
"description": "G6 sites deployed on gh-pages",
66
"keywords": [
77
"antv",
@@ -36,7 +36,7 @@
3636
"dependencies": {
3737
"@ant-design/icons": "^4.0.6",
3838
"@antv/chart-node-g6": "^0.0.3",
39-
"@antv/g6": "4.3.6",
39+
"@antv/g6": "4.3.7",
4040
"@antv/gatsby-theme-antv": "1.1.1",
4141
"@antv/util": "^2.0.9",
4242
"@antv/vis-predict-engine": "^0.1.1",

0 commit comments

Comments
 (0)