Fix multiple dragged nodes snapping back sometimes (#1619)

Fix dragging a selection of nodes on one axis (in screen pixels) resetting the selection.

Fix dragging on one axis only
This commit is contained in:
0HyperCube 2024-02-18 21:56:40 +00:00 committed by GitHub
parent 6f6fb3bcd4
commit 0e0e347435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -646,7 +646,7 @@
return;
} else if (draggingNodes) {
if (draggingNodes.startX === e.x || draggingNodes.startY === e.y) {
if (draggingNodes.startX === e.x && draggingNodes.startY === e.y) {
if (selectIfNotDragged !== undefined && ($nodeGraph.selected.length !== 1 || $nodeGraph.selected[0] !== selectIfNotDragged)) {
editor.instance.selectNodes(new BigUint64Array([selectIfNotDragged]));
}