From 809a1dfe756d6da4e672a91b1e37c6760a57abc0 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Tue, 3 Mar 2026 23:58:46 +0300 Subject: [PATCH] Clear hover on zoom/pinch to keep scene picture cache valid --- src/composables/use-canvas-input.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/composables/use-canvas-input.ts b/src/composables/use-canvas-input.ts index 9a0f07b68..cf7c18436 100644 --- a/src/composables/use-canvas-input.ts +++ b/src/composables/use-canvas-input.ts @@ -931,6 +931,7 @@ export function useCanvasInput( function flushWheel() { wheelAccum.rafId = 0 + store.setHoveredNode(null) if (wheelAccum.hasZoom) { store.applyZoom(wheelAccum.zoomDelta, wheelAccum.zoomCenterX, wheelAccum.zoomCenterY) } else { @@ -1141,6 +1142,7 @@ export function useCanvasInput( const newMidX = (a.clientX + b.clientX) / 2 - rect.left const newMidY = (a.clientY + b.clientY) / 2 - rect.top + store.setHoveredNode(null) const newDist = touchDist(a, b) if (pinchStartDist > 0) { const scale = newDist / pinchStartDist @@ -1210,6 +1212,7 @@ export function useCanvasInput( function flushGesture() { gestureRafId = 0 if (!pendingGesture) return + store.setHoveredNode(null) const { scale, sx, sy } = pendingGesture pendingGesture = null const newZoom = Math.max(0.02, Math.min(256, gestureStartZoom * scale))