Skip to content

Commit c0f6161

Browse files
authored
feat: beforechangedata and afterchagnedata for graph changeData; feat… (#3932)
* feat: beforechangedata and afterchagnedata for graph changeData; feat: Annotation supports icon events callbacks; feat: Annotation supports defaultBegin position configuration for new annotation cards; perf: Annotation updated automatically when graph data changed and graph item visiblity changed; * fix: Destroy legend canvas when the plugin is destroyed, closes: #3931; fix: unexpected console, closes: #3926
1 parent 8a4f7a5 commit c0f6161

File tree

14 files changed

+136
-45
lines changed

14 files changed

+136
-45
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# ChangeLog
22

3+
### 4.7.3
4+
5+
- feat: beforechangedata and afterchagnedata for graph changeData;
6+
- feat: Annotation supports icon events callbacks;
7+
- feat: Annotation supports defaultBegin position configuration for new annotation cards;
8+
- perf: Annotation updated automatically when graph data changed and graph item visiblity changed;
9+
- fix: Destroy legend canvas when the plugin is destroyed, closes: #3931;
10+
311
### 4.7.2
412

513
- feat: Annotation plugin supports configuring behaviors for collapse and close icon;

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.7.2",
3+
"version": "0.7.3",
44
"description": "A Graph Visualization Framework in JavaScript",
55
"keywords": [
66
"antv",

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.7.2',
67+
version: '0.7.3',
6868
rootContainerClassName: 'root-container',
6969
nodeContainerClassName: 'node-container',
7070
edgeContainerClassName: 'edge-container',

packages/core/src/graph/graph.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,7 @@ export default abstract class AbstractGraph extends EventEmitter implements IAbs
16111611
if (!dataValidation(data)) {
16121612
return this;
16131613
}
1614+
this.emit('beforechangedata');
16141615
if (stack && this.get('enabledStack')) {
16151616
this.pushStack('changedata', {
16161617
before: self.save(),
@@ -1729,6 +1730,7 @@ export default abstract class AbstractGraph extends EventEmitter implements IAbs
17291730
setTimeout(() => {
17301731
canvas.set('localRefresh', localRefresh);
17311732
}, 16);
1733+
this.emit('afterchangedata');
17321734
return this;
17331735
}
17341736

packages/element/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g6-element",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
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.7.2",
64+
"@antv/g6-core": "0.7.3",
6565
"@antv/util": "~2.0.5"
6666
},
6767
"devDependencies": {

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.7.2",
3+
"version": "4.7.3",
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.7.2"
69+
"@antv/g6-pc": "0.7.3"
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.7.2';
3+
G6.version = '4.7.3';
44

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

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.7.2",
3+
"version": "0.7.3",
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.7.2",
79-
"@antv/g6-element": "0.7.2",
80-
"@antv/g6-plugin": "0.7.2",
78+
"@antv/g6-core": "0.7.3",
79+
"@antv/g6-element": "0.7.3",
80+
"@antv/g6-plugin": "0.7.3",
8181
"@antv/hierarchy": "^0.6.7",
8282
"@antv/layout": "^0.3.0",
8383
"@antv/matrix-util": "^3.1.0-beta.3",

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.7.2',
10+
version: '0.7.3',
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.7.2",
3+
"version": "0.7.3",
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.7.2",
26-
"@antv/g6-element": "0.7.2",
25+
"@antv/g6-core": "0.7.3",
26+
"@antv/g6-element": "0.7.3",
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)