fix(core): select nodes on drag when threshold is > 0

This commit is contained in:
braks
2023-10-30 13:36:07 +01:00
committed by Braks
parent ec7653e8f3
commit ee45b4e560
@@ -54,6 +54,7 @@ const NodeWrapper = defineComponent({
ariaLiveMessage, ariaLiveMessage,
snapToGrid, snapToGrid,
snapGrid, snapGrid,
nodeDragThreshold,
} = useVueFlow() } = useVueFlow()
const updateNodePositions = useUpdateNodePositions() const updateNodePositions = useUpdateNodePositions()
@@ -305,7 +306,7 @@ const NodeWrapper = defineComponent({
} }
function onSelectNode(event: MouseEvent) { function onSelectNode(event: MouseEvent) {
if (props.selectable && (!selectNodesOnDrag.value || !props.draggable)) { if (props.selectable && (!selectNodesOnDrag.value || !props.draggable || nodeDragThreshold.value > 0)) {
handleNodeClick( handleNodeClick(
node.value, node.value,
multiSelectionActive.value, multiSelectionActive.value,