Merge pull request #3820 from xyflow/fix-selection-key

Selection process is not interrupted by selectionKey being let go
This commit is contained in:
Moritz Klack
2024-01-23 15:25:21 +01:00
committed by GitHub
4 changed files with 9 additions and 4 deletions
@@ -73,7 +73,8 @@
let selectedNodes: Node[] = [];
$: _panOnDrag = $panActivationKeyPressed || panOnDrag;
$: isSelecting = $selectionKeyPressed || (selectionOnDrag && _panOnDrag !== true);
$: isSelecting =
$selectionKeyPressed || $selectionRect || (selectionOnDrag && _panOnDrag !== true);
$: hasActiveSelection = $elementsSelectable && (isSelecting || $selectionRectMode === 'user');
function onClick(event: MouseEvent | TouchEvent) {