refactor(core): skip d3 events with no underlying source event

This commit is contained in:
braks
2022-11-06 10:18:51 +01:00
committed by Braks
parent 8c0acd624d
commit 2a5afe706e

View File

@@ -113,6 +113,8 @@ onMounted(() => {
const zoomKeyPressed = useKeyPress(zoomActivationKeyCode)
d3Zoom.on('start', (event: D3ZoomEvent<HTMLDivElement, any>) => {
if (!event.sourceEvent) return null
isZoomingOrPanning = true
const flowTransform = eventToFlowTransform(event.transform)
@@ -127,6 +129,8 @@ onMounted(() => {
})
d3Zoom.on('end', (event: D3ZoomEvent<HTMLDivElement, any>) => {
if (!event.sourceEvent) return null
isZoomingOrPanning = false
isDragging = false