Skip to content

Commit ab461c1

Browse files
authored
feat: layout supports relayoutAtChangeData config to disable relayout… (#4796)
* feat: layout supports relayoutAtChangeData config to disable relayout while changeData of graph is called; * chore: update build script
1 parent a73b940 commit ab461c1

File tree

10 files changed

+22
-17
lines changed

10 files changed

+22
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ChangeLog
22

3+
### 4.8.21
4+
5+
- feat: layout supports relayoutAtChangeData config to disable relayout while changeData of graph is called;
6+
37
### 4.8.20
48

59
- fix: parent combo size problem, closes: #4734;

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-core",
3-
"version": "0.8.20",
3+
"version": "0.8.21",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",

packages/core/src/global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const colorSet = {
6464
};
6565

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

packages/core/src/graph/graph.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,8 +1703,9 @@ export default abstract class AbstractGraph extends EventEmitter implements IAbs
17031703

17041704
this.set({ nodes: items.nodes, edges: items.edges });
17051705

1706+
const { relayoutAtChangeData = true } = this.get('layout') || {};
17061707
const layoutController = this.get('layoutController');
1707-
if (layoutController) {
1708+
if (relayoutAtChangeData && layoutController) {
17081709
layoutController.changeData(() => {
17091710
setTimeout(() => {
17101711
self.getCombos()?.forEach(combo => {

packages/element/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-element",
3-
"version": "0.8.20",
3+
"version": "0.8.21",
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.8.20",
64+
"@antv/g6-core": "0.8.21",
6565
"@antv/util": "~2.0.5"
6666
},
6767
"devDependencies": {

packages/g6/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6",
3-
"version": "4.8.20",
3+
"version": "4.8.21",
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.8.20"
69+
"@antv/g6-pc": "0.8.21"
7070
},
7171
"devDependencies": {
7272
"@babel/core": "^7.7.7",

packages/g6/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import G6 from '@antv/g6-pc';
22

3-
G6.version = '4.8.20';
3+
G6.version = '4.8.21';
44

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

packages/pc/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-pc",
3-
"version": "0.8.20",
3+
"version": "0.8.21",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",
@@ -75,9 +75,9 @@
7575
"@antv/g-canvas": "^0.5.2",
7676
"@antv/g-math": "^0.1.1",
7777
"@antv/g-svg": "^0.5.1",
78-
"@antv/g6-core": "0.8.20",
79-
"@antv/g6-element": "0.8.20",
80-
"@antv/g6-plugin": "0.8.20",
78+
"@antv/g6-core": "0.8.21",
79+
"@antv/g6-element": "0.8.21",
80+
"@antv/g6-plugin": "0.8.21",
8181
"@antv/hierarchy": "^0.6.10",
8282
"@antv/layout": "^0.3.0",
8383
"@antv/matrix-util": "^3.1.0-beta.3",

packages/pc/src/global.ts

Lines changed: 1 addition & 1 deletion
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.8.20',
10+
version: '0.8.21',
1111
rootContainerClassName: 'root-container',
1212
nodeContainerClassName: 'node-container',
1313
edgeContainerClassName: 'edge-container',

packages/plugin/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-plugin",
3-
"version": "0.8.20",
3+
"version": "0.8.21",
44
"description": "G6 Plugin",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -22,8 +22,8 @@
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.8.20",
26-
"@antv/g6-element": "0.8.20",
25+
"@antv/g6-core": "0.8.21",
26+
"@antv/g6-element": "0.8.21",
2727
"@antv/matrix-util": "^3.1.0-beta.3",
2828
"@antv/scale": "^0.3.4",
2929
"@antv/util": "^2.0.9",

0 commit comments

Comments
 (0)