diff --git a/CHANGELOG.md b/CHANGELOG.md index cdb307b9c4f..ecf0079fab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # ChangeLog +#### 4.3.7 + +- fix: update edge to be horizontal and the label is on wrong position; + #### 4.3.6 - fix: drag-node on mobile, closes: #3127; diff --git a/packages/core/package.json b/packages/core/package.json index 8dd36c1ce8d..060f873d2e9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6-core", - "version": "0.3.6", + "version": "0.3.7", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", diff --git a/packages/core/src/element/shapeBase.ts b/packages/core/src/element/shapeBase.ts index 898cdd65c3c..2d00202c4c7 100644 --- a/packages/core/src/element/shapeBase.ts +++ b/packages/core/src/element/shapeBase.ts @@ -298,7 +298,7 @@ export const shapeBase: ShapeOptions = { delete labelStyle.rotate; // 计算 label 的旋转矩阵 - if (rotate) { + if (rotate || rotate === 0) { // if G 4.x define the rotateAtStart, use it directly instead of using the following codes let rotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; rotateMatrix = transform(rotateMatrix, [ @@ -328,7 +328,7 @@ export const shapeBase: ShapeOptions = { ); const labelBgStyle = { ...calculateBgStyle, ...cfgBgStyle }; labelBg.resetMatrix(); - if (rotate) { + if (rotate || rotate === 0) { let bgRotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]; bgRotateMatrix = transform(bgRotateMatrix, [ ['t', -labelBgStyle.x, -labelBgStyle.y], diff --git a/packages/core/src/global.ts b/packages/core/src/global.ts index a8deee70ca0..00136a73f94 100644 --- a/packages/core/src/global.ts +++ b/packages/core/src/global.ts @@ -64,7 +64,7 @@ const colorSet = { }; export default { - version: '0.3.6', + version: '0.3.7', rootContainerClassName: 'root-container', nodeContainerClassName: 'node-container', edgeContainerClassName: 'edge-container', diff --git a/packages/element/package.json b/packages/element/package.json index c93b35643c2..3beca1ee850 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6-element", - "version": "0.3.6", + "version": "0.3.7", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", @@ -61,7 +61,7 @@ }, "dependencies": { "@antv/g-base": "^0.5.1", - "@antv/g6-core": "0.3.6", + "@antv/g6-core": "0.3.7", "@antv/util": "~2.0.5" }, "devDependencies": { @@ -87,6 +87,6 @@ "ts-jest": "^24.1.0", "ts-loader": "^7.0.3", "typescript": "^3.9.5", - "@antv/g6": "4.3.6" + "@antv/g6": "4.3.7" } } \ No newline at end of file diff --git a/packages/g6/package.json b/packages/g6/package.json index b90dfc01797..43086f8e078 100644 --- a/packages/g6/package.json +++ b/packages/g6/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6", - "version": "4.3.6", + "version": "4.3.7", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@antv/g6-pc": "0.3.6" + "@antv/g6-pc": "0.3.7" }, "devDependencies": { "@babel/core": "^7.7.7", diff --git a/packages/g6/src/index.ts b/packages/g6/src/index.ts index 97dd35f0027..151380f1020 100644 --- a/packages/g6/src/index.ts +++ b/packages/g6/src/index.ts @@ -1,7 +1,7 @@ import G6 from '@antv/g6-pc'; -G6.version = '4.3.6'; +G6.version = '4.3.7'; export * from '@antv/g6-pc'; export default G6; -export const version = '4.3.6'; +export const version = '4.3.7'; diff --git a/packages/pc/package.json b/packages/pc/package.json index da6def919ff..e60ab6ca04b 100644 --- a/packages/pc/package.json +++ b/packages/pc/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6-pc", - "version": "0.3.6", + "version": "0.3.7", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", @@ -74,9 +74,9 @@ "@antv/g-canvas": "^0.5.2", "@antv/g-math": "^0.1.1", "@antv/g-svg": "^0.5.1", - "@antv/g6-core": "0.3.6", - "@antv/g6-plugin": "0.3.6", - "@antv/g6-element": "0.3.6", + "@antv/g6-core": "0.3.7", + "@antv/g6-plugin": "0.3.7", + "@antv/g6-element": "0.3.7", "@antv/algorithm": "^0.1.8", "@antv/hierarchy": "^0.6.7", "@antv/layout": "^0.1.14", diff --git a/packages/pc/src/global.ts b/packages/pc/src/global.ts index 2bef9ecbf83..0ae371d1a9a 100644 --- a/packages/pc/src/global.ts +++ b/packages/pc/src/global.ts @@ -7,7 +7,7 @@ const textColor = 'rgb(0, 0, 0)'; const colorSet = getColorsWithSubjectColor(subjectColor, backColor); export default { - version: '0.3.6', + version: '0.3.7', rootContainerClassName: 'root-container', nodeContainerClassName: 'node-container', edgeContainerClassName: 'edge-container', diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 6143f5c863b..a3b53daae59 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6-plugin", - "version": "0.3.6", + "version": "0.3.7", "description": "G6 Plugin", "main": "lib/index.js", "module": "es/index.js", @@ -22,7 +22,7 @@ "@antv/g-base": "^0.5.1", "@antv/g-canvas": "^0.5.2", "@antv/g-svg": "^0.5.2", - "@antv/g6-core": "0.3.6", + "@antv/g6-core": "0.3.7", "@antv/matrix-util": "^3.0.4", "@antv/scale": "^0.3.4", "@antv/util": "^2.0.9", @@ -57,6 +57,6 @@ "jquery": "^3.5.1", "rimraf": "^3.0.2", "ts-jest": "^26.4.4", - "@antv/g6": "4.3.6" + "@antv/g6": "4.3.7" } } \ No newline at end of file diff --git a/packages/site/package.json b/packages/site/package.json index 0bbbbd376d3..a1a4ede82cf 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@antv/g6-site", - "version": "4.3.6", + "version": "4.3.7", "description": "G6 sites deployed on gh-pages", "keywords": [ "antv", @@ -36,7 +36,7 @@ "dependencies": { "@ant-design/icons": "^4.0.6", "@antv/chart-node-g6": "^0.0.3", - "@antv/g6": "4.3.6", + "@antv/g6": "4.3.7", "@antv/gatsby-theme-antv": "1.1.1", "@antv/util": "^2.0.9", "@antv/vis-predict-engine": "^0.1.1",