only capture pointer for when selection is starting
This commit is contained in:
@@ -120,7 +120,6 @@ export function Pane({
|
|||||||
const onPointerDown = (event: ReactPointerEvent): void => {
|
const onPointerDown = (event: ReactPointerEvent): void => {
|
||||||
const { resetSelectedElements, domNode, edgeLookup } = store.getState();
|
const { resetSelectedElements, domNode, edgeLookup } = store.getState();
|
||||||
containerBounds.current = domNode?.getBoundingClientRect();
|
containerBounds.current = domNode?.getBoundingClientRect();
|
||||||
(event.target as Element)?.setPointerCapture?.(event.pointerId);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!elementsSelectable ||
|
!elementsSelectable ||
|
||||||
@@ -132,6 +131,8 @@ export function Pane({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(event.target as Element)?.setPointerCapture?.(event.pointerId);
|
||||||
|
|
||||||
selectionStarted.current = true;
|
selectionStarted.current = true;
|
||||||
selectionInProgress.current = false;
|
selectionInProgress.current = false;
|
||||||
edgeIdLookup.current = new Map();
|
edgeIdLookup.current = new Map();
|
||||||
|
|||||||
Reference in New Issue
Block a user