Skip to content

Commit

Permalink
fix: update dragging things pos when wheeling
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Nov 14, 2023
1 parent d6e703b commit d4c378b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/visual-flow/src/model/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ export class Graph {

this.boardScale = newScale;

this.syncGraphAndBoardMousePos();
this.onMouseMove(this.mouseDown, false);
this.updatePosition();
return true;
}
Expand Down Expand Up @@ -862,12 +864,16 @@ export class Graph {

onHorizontalScroll(delta: number) {
this.boardOffsetX += delta / this.boardScale;
this.syncGraphAndBoardMousePos();
this.onMouseMove(this.mouseDown, false);
this.updatePosition();
return true;
}

onVerticalScroll(delta: number) {
this.boardOffsetY += delta / this.boardScale;
this.syncGraphAndBoardMousePos();
this.onMouseMove(this.mouseDown, false);
this.updatePosition();
return true;
}
Expand Down

0 comments on commit d4c378b

Please sign in to comment.