fix(selection): dont trigger onSelectionEnd on click

This commit is contained in:
moklick
2024-07-15 14:38:46 +02:00
parent 487b13c9ad
commit 9b8486b39f
2 changed files with 12 additions and 3 deletions
@@ -77,7 +77,8 @@ function FlowRendererComponent<NodeType extends Node = Node>({
const panOnDrag = panActivationKeyPressed || _panOnDrag;
const panOnScroll = panActivationKeyPressed || _panOnScroll;
const isSelecting = selectionKeyPressed || userSelectionActive || (selectionOnDrag && panOnDrag !== true);
const _selectionOnDrag = selectionOnDrag && panOnDrag !== true;
const isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;
useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode });
@@ -117,6 +118,7 @@ function FlowRendererComponent<NodeType extends Node = Node>({
isSelecting={!!isSelecting}
selectionMode={selectionMode}
selectionKeyPressed={selectionKeyPressed}
selectionOnDrag={_selectionOnDrag}
>
{children}
{nodesSelectionActive && (