Skip to content

Commit

Permalink
fix(interaction-handler): commit selection change on drag start (#1740)
Browse files Browse the repository at this point in the history
It was changed but not commited with lead to issues like sometimes the wrong node being moved when dragging.

Co-authored-by: Yotam Berkowitz <[email protected]>
  • Loading branch information
Thomaash and yotamberk committed Mar 28, 2022
1 parent 45edef7 commit 8602b1f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/network/modules/InteractionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ class InteractionHandler {
this.drag.nodeId = node.id;
// select the clicked node if not yet selected
if (node.isSelected() === false) {
this.selectionHandler.unselectAll();
this.selectionHandler.selectObject(node);
this.selectionHandler.setSelection({ nodes: [node.id] });
}

// after select to contain the node
Expand Down

0 comments on commit 8602b1f

Please sign in to comment.