From b0ca5a5bc9eccbe511153a3ed17c0ca55656d0e9 Mon Sep 17 00:00:00 2001 From: Ivan Akulov Date: Wed, 22 Nov 2023 18:50:15 +0100 Subject: [PATCH] Set nodeDragThreshold to 1 This removes an expensive `dragging: false` update on mouseup (with `dragging: true` never even dispatched) --- packages/react/src/store/initialState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/store/initialState.ts b/packages/react/src/store/initialState.ts index 48e5434f..e0482961 100644 --- a/packages/react/src/store/initialState.ts +++ b/packages/react/src/store/initialState.ts @@ -61,7 +61,7 @@ const getInitialState = ({ paneDragging: false, noPanClassName: 'nopan', nodeOrigin: [0, 0], - nodeDragThreshold: 0, + nodeDragThreshold: 1, snapGrid: [15, 15], snapToGrid: false,