fix(core): avoid undraggable selected nodes being dragged

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-05 22:22:16 +01:00
committed by Braks
parent aaf46dc22c
commit c7e8bd7630
3 changed files with 28 additions and 19 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ function useDrag(params: UseDragParams) {
nodeExtent,
viewport,
autoPanOnNodeDrag,
nodesDraggable,
panBy,
findNode,
multiSelectionActive,
@@ -146,7 +147,7 @@ function useDrag(params: UseDragParams) {
const pointerPos = getPointerPosition(event)
lastPos = pointerPos
dragItems = getDragItems(nodes, pointerPos, findNode, id)
dragItems = getDragItems(nodes, nodesDraggable, pointerPos, findNode, id)
if (dragItems.length) {
const [currentNode, nodes] = getEventHandlerParams({