From b25c2c8363c5726b09bd25cf64d15b3d94f74f01 Mon Sep 17 00:00:00 2001 From: auberginewly <3127221787@qq.com> Date: Tue, 19 May 2026 11:08:54 +0800 Subject: [PATCH] revert(zoom): drop selected-zoom preview override, preview the current frame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The a686fa0 override replaced findDominantRegion's resolved region with the raw stored region (forcing strength=1 / transition=null). findDominantRegion already resolves focus via getResolvedFocus — for focusMode:"auto" it interpolates the cursor-followed focus from telemetry and applies clamp/blend/ transition. The override bypassed all of that, so previewing an auto-focus zoom showed a stale static focus and an instant un-eased zoom that did not match real playback/export. Hold-to-preview now shows the natural zoom for the current playhead frame (true before/after compare). The isPreviewingZoom flag is kept — it only disables the un-zoomed editing guard so findDominantRegion's result is shown. Previewing while the playhead is outside any zoom shows no zoom by design. --- src/components/video-editor/VideoPlayback.tsx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx index 5243ff5..0c58572 100644 --- a/src/components/video-editor/VideoPlayback.tsx +++ b/src/components/video-editor/VideoPlayback.tsx @@ -59,8 +59,6 @@ import { DEFAULT_CURSOR_SIZE, DEFAULT_CURSOR_SMOOTHING, DEFAULT_ROTATION_3D, - getRotation3D, - getZoomScale, isRotation3DIdentity, lerpRotation3D, rotation3DPerspective, @@ -1303,7 +1301,7 @@ const VideoPlayback = forwardRef( let lastTransformIsIdentity = true; let lastPerspectiveValue = 0; const ticker = () => { - let { region, strength, blendedScale, rotation3D, transition } = findDominantRegion( + const { region, strength, blendedScale, rotation3D, transition } = findDominantRegion( zoomRegionsRef.current, currentTimeRef.current, { @@ -1312,21 +1310,6 @@ const VideoPlayback = forwardRef( }, ); - // While holding Preview, show the SELECTED zoom (what the settings panel - // is editing) at full strength, independent of the playhead — otherwise - // the preview reflects whatever region sits at currentTime, which may be - // none or a different zoom when the playhead isn't inside the selection. - if (isPreviewingZoomRef.current && selectedZoomIdRef.current) { - const sel = zoomRegionsRef.current.find((r) => r.id === selectedZoomIdRef.current); - if (sel) { - region = sel; - strength = 1; - blendedScale = getZoomScale(sel); - rotation3D = getRotation3D(sel); - transition = null; - } - } - const defaultFocus = DEFAULT_FOCUS; let targetScaleFactor = 1; let targetFocus = defaultFocus;