fixed pointer capture for svelte as well

This commit is contained in:
peterkogo
2024-07-30 13:56:27 +02:00
parent 96b2795f48
commit c457890a1f
@@ -92,7 +92,6 @@
function onPointerDown(event: PointerEvent) {
containerBounds = container.getBoundingClientRect();
(event.target as Element)?.setPointerCapture?.(event.pointerId);
if (
!elementsSelectable ||
@@ -104,6 +103,8 @@
return;
}
(event.target as Element)?.setPointerCapture?.(event.pointerId);
const { x, y } = getEventPosition(event, containerBounds);
unselectNodesAndEdges();