Merge pull request #5344 from xyflow/feat/connection-drag-threshold

Add connectionDragThreshold
This commit is contained in:
Moritz Klack
2025-06-25 16:40:49 +02:00
committed by GitHub
18 changed files with 90 additions and 17 deletions
@@ -64,6 +64,7 @@
fitViewOptions,
nodeOrigin,
nodeDragThreshold,
connectionDragThreshold,
minZoom,
maxZoom,
initialViewport,
@@ -170,6 +170,12 @@ export type SvelteFlowProps<
* @default 0
*/
nodeClickDistance?: number;
/**
* The threshold in pixels that the mouse must move before a connection line starts to drag.
* This is useful to prevent accidental connections when clicking on a handle.
* @default 1
*/
connectionDragThreshold?: number;
/** Minimum zoom level
* @default 0.5
*/