From 5ebef969356ee6f476fda05ed1ab7f0c00e8a731 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Sun, 9 Nov 2025 16:44:11 -0700 Subject: [PATCH] better ux for previewing zoom only during playback and not showing default while applying --- src/components/video-editor/VideoPlayback.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx index 42976ef..2804bc0 100644 --- a/src/components/video-editor/VideoPlayback.tsx +++ b/src/components/video-editor/VideoPlayback.tsx @@ -593,7 +593,13 @@ const VideoPlayback = forwardRef(({ let targetScaleFactor = 1; let targetFocus = defaultFocus; - if (region && strength > 0) { + // If a zoom is selected but video is not playing, show default unzoomed view + // (the overlay will show where the zoom will be) + const selectedId = selectedZoomIdRef.current; + const hasSelectedZoom = selectedId !== null; + const shouldShowUnzoomedView = hasSelectedZoom && !isPlayingRef.current; + + if (region && strength > 0 && !shouldShowUnzoomedView) { const zoomScale = ZOOM_DEPTH_SCALES[region.depth]; const regionFocus = clampFocusToStage(region.focus, region.depth);