feat(core): add paneClickDistance (#1542)

* feat(core): add `paneClickDistance`

* chore(changeset): add
This commit is contained in:
Braks
2024-07-15 19:14:01 +02:00
parent 8539731a8a
commit 180109c0ca
6 changed files with 23 additions and 1 deletions
+5
View File
@@ -307,6 +307,10 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
updateNodeInternals()
}
const setPaneClickDistance: Actions['setPaneClickDistance'] = (clickDistance) => {
state.d3Zoom?.clickDistance(clickDistance)
}
const setInteractive: Actions['setInteractive'] = (isInteractive) => {
state.nodesDraggable = isInteractive
state.nodesConnectable = isInteractive
@@ -863,6 +867,7 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
setMaxZoom,
setTranslateExtent,
setNodeExtent,
setPaneClickDistance,
removeSelectedElements,
removeSelectedNodes,
removeSelectedEdges,