Skip to content

Commit 5c906a3

Browse files
committed
zoom slider sync
1 parent 30503ad commit 5c906a3

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
@@ -7,6 +7,7 @@ class GraphCanvas extends Core {
77

88
resetZoom() {
99
this.cy.reset();
10+
this.dispatcher({ type: T.SET_ZOOM_LEVEL, payload: this.getZoom() });
1011
}
1112

1213
setOnZoom(cb) {
@@ -17,6 +18,7 @@ class GraphCanvas extends Core {
1718

1819
fitZoom() {
1920
this.cy.fit();
21+
this.dispatcher({ type: T.SET_ZOOM_LEVEL, payload: this.getZoom() });
2022
}
2123

2224
setZoom(v) {

0 commit comments

Comments
 (0)