fix(nodes): if draggable equals false node is also not draggable with selection

This commit is contained in:
moklick
2023-02-03 19:08:10 +01:00
parent 1998a3b088
commit 1ba3c0e91f
4 changed files with 20 additions and 6 deletions
+3 -2
View File
@@ -133,10 +133,11 @@ function useDrag({
const {
nodeInternals,
multiSelectionActive,
domNode,
nodesDraggable,
unselectNodesAndEdges,
onNodeDragStart,
onSelectionDragStart,
domNode,
} = store.getState();
const onStart = nodeId ? onNodeDragStart : wrapSelectionDragFunc(onSelectionDragStart);
@@ -157,7 +158,7 @@ function useDrag({
const pointerPos = getPointerPosition(event);
lastPos.current = pointerPos;
dragItems.current = getDragItems(nodeInternals, pointerPos, nodeId);
dragItems.current = getDragItems(nodeInternals, nodesDraggable, pointerPos, nodeId);
if (onStart && dragItems.current) {
const [currentNode, nodes] = getEventHandlerParams({