feat(core): add paneClickDistance (#1542)
* feat(core): add `paneClickDistance` * chore(changeset): add
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -47,6 +47,7 @@ export function useState(): State {
|
||||
panOnScroll: false,
|
||||
panOnScrollSpeed: 0.5,
|
||||
panOnScrollMode: PanOnScrollMode.Free,
|
||||
paneClickDistance: 0,
|
||||
panOnDrag: true,
|
||||
edgeUpdaterRadius: 10,
|
||||
onlyRenderVisibleElements: false,
|
||||
|
||||
Reference in New Issue
Block a user