Skip to content

Commit

Permalink
fix(manipulation): panning in add edge mode (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidIreland1 authored May 8, 2020
1 parent f050cfe commit 8c91d37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/network/modules/ManipulationSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,9 @@ class ManipulationSystem {
this.lastTouch = this.body.functions.getPointer(event.center);
this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object

this.interactionHandler.drag.pointer = this.lastTouch; // Drag pointer is not updated when adding edges
this.interactionHandler.drag.translation = this.lastTouch.translation;

let pointer = this.lastTouch;
let node = this.selectionHandler.getNodeAt(pointer);

Expand Down

0 comments on commit 8c91d37

Please sign in to comment.