Skip to content

Commit

Permalink
fix: update edge to be horizontal and the label is on wrong position;
Browse files Browse the repository at this point in the history
  • Loading branch information
shiwu authored and Yanyan-Wang committed Sep 24, 2021
1 parent 94b98ee commit 50b3d4d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/element/shapeBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand Down Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions packages/element/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/g6/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6",
"version": "4.3.6",
"version": "4.3.7",
"description": "A Graph Visualization Framework in JavaScript",
"keywords": [
"antv",
Expand Down Expand Up @@ -66,7 +66,7 @@
]
},
"dependencies": {
"@antv/g6-pc": "0.3.6"
"@antv/g6-pc": "0.3.7"
},
"devDependencies": {
"@babel/core": "^7.7.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/g6/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
8 changes: 4 additions & 4 deletions packages/pc/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/pc/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/site/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 50b3d4d

Please sign in to comment.