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

This commit is contained in:
braks
2023-10-09 13:08:19 +02:00
committed by Braks
parent ec7653e8f3
commit ee45b4e560

View File

@@ -54,6 +54,7 @@ const NodeWrapper = defineComponent({
ariaLiveMessage,
snapToGrid,
snapGrid,
nodeDragThreshold,
} = useVueFlow()
const updateNodePositions = useUpdateNodePositions()
@@ -305,7 +306,7 @@ const NodeWrapper = defineComponent({
}
function onSelectNode(event: MouseEvent) {
if (props.selectable && (!selectNodesOnDrag.value || !props.draggable)) {
if (props.selectable && (!selectNodesOnDrag.value || !props.draggable || nodeDragThreshold.value > 0)) {
handleNodeClick(
node.value,
multiSelectionActive.value,