Skip to content

Commit f4c3429

Browse files
authored
Merge pull request #158 from parteekcoder/zoom-slider
zoom slider sync
2 parents a0b1a90 + 29a2c4a commit f4c3429

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/graph-builder/graph-core/2-canvas.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class GraphCanvas extends Core {
88
resetZoom() {
99
this.cy.reset();
1010
this.cy.center();
11+
this.dispatcher({ type: T.SET_ZOOM_LEVEL, payload: this.getZoom() });
1112
}
1213

1314
setOnZoom(cb) {
@@ -18,6 +19,7 @@ class GraphCanvas extends Core {
1819

1920
fitZoom() {
2021
this.cy.fit();
22+
this.dispatcher({ type: T.SET_ZOOM_LEVEL, payload: this.getZoom() });
2123
}
2224

2325
setZoom(v) {

0 commit comments

Comments
 (0)