AI-native design editor. Open-source Figma alternative.
Clear hover on zoom/pinch to keep scene picture cache valid
Danila Poyarkov809a1dfe756d
diff --git a/src/composables/use-canvas-input.ts b/src/composables/use-canvas-input.tsindex 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.leftconst 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 = 0if (!pendingGesture) return+ store.setHoveredNode(null)const { scale, sx, sy } = pendingGesturependingGesture = nullconst newZoom = Math.max(0.02, Math.min(256, gestureStartZoom * scale))