fix(node-selection): cleanup selection when node is not selectable

This commit is contained in:
moklick
2023-09-19 13:32:32 +02:00
parent e00f08acf9
commit 581778c76f
+1 -1
View File
@@ -208,7 +208,7 @@ export function XYDrag({
unselectNodesAndEdges,
} = getStoreItems();
if (!selectNodesOnDrag && !multiSelectionActive && nodeId) {
if ((!selectNodesOnDrag || !isSelectable) && !multiSelectionActive && nodeId) {
if (!nodes.find((n) => n.id === nodeId)?.selected) {
// we need to reset selected nodes when selectNodesOnDrag=false
unselectNodesAndEdges();