Skip to content

Commit

Permalink
fix(nodes): dont drag other nodes when selecNodesOnDrag=false closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Dec 18, 2020
1 parent d11ad56 commit 52c5410
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Nodes/wrapNode.tsx
Expand Up @@ -116,6 +116,9 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
if (!selected) {
addSelectedElements({ id: node.id, type: node.type } as Node);
}
} else if (!selectNodesOnDrag && !selected && isSelectable) {
unsetNodesSelection();
addSelectedElements([]);
}
},
[node, selected, selectNodesOnDrag, isSelectable, onNodeDragStart]
Expand Down

0 comments on commit 52c5410

Please sign in to comment.