From 8f6f1d3d68465523e1d0f31bcec29525880cb327 Mon Sep 17 00:00:00 2001 From: webadderall <131426131+webadderall@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:00:16 +1000 Subject: [PATCH] feat(zoom): add mode switcher and smoothness slider to zoom UI Add auto/manual pill-button mode switcher in zoom region detail. Move Zoom Smoothness slider from cursor section to zoom section. --- src/components/video-editor/SettingsPanel.tsx | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index c8c22f78..4355c9c3 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -41,6 +41,7 @@ import type { WebcamOverlaySettings, WebcamPositionPreset, ZoomDepth, + ZoomMode, ZoomTransitionEasing, } from "./types"; import { @@ -149,6 +150,8 @@ interface SettingsPanelProps { selectedZoomDepth?: ZoomDepth | null; onZoomDepthChange?: (depth: ZoomDepth) => void; selectedZoomId?: string | null; + selectedZoomMode?: ZoomMode | null; + onZoomModeChange?: (mode: ZoomMode) => void; onZoomDelete?: (id: string) => void; selectedTrimId?: string | null; onTrimDelete?: (id: string) => void; @@ -190,6 +193,8 @@ interface SettingsPanelProps { onCursorSizeChange?: (size: number) => void; cursorSmoothing?: number; onCursorSmoothingChange?: (smoothing: number) => void; + zoomSmoothness?: number; + onZoomSmoothnessChange?: (smoothness: number) => void; cursorMotionBlur?: number; onCursorMotionBlurChange?: (amount: number) => void; cursorClickBounce?: number; @@ -508,6 +513,8 @@ export function SettingsPanel({ selectedZoomDepth, onZoomDepthChange, selectedZoomId, + selectedZoomMode, + onZoomModeChange, onZoomDelete, selectedTrimId, onTrimDelete, @@ -531,6 +538,8 @@ export function SettingsPanel({ onCursorSizeChange, cursorSmoothing = 2, onCursorSmoothingChange, + zoomSmoothness = 1.0, + onZoomSmoothnessChange, cursorMotionBlur = DEFAULT_CURSOR_MOTION_BLUR, onCursorMotionBlurChange, cursorClickBounce = 1, @@ -1808,6 +1817,17 @@ export function SettingsPanel({ formatValue={(v) => (v <= 0 ? tSettings("effects.off") : v.toFixed(2))} parseInput={(text) => parseFloat(text)} /> + onZoomSmoothnessChange?.(v)} + formatValue={(v) => (v <= 0 ? tSettings("effects.off") : v.toFixed(2))} + parseInput={(text) => parseFloat(text)} + /> +
+
+ + +
+

+ {selectedZoomMode === 'manual' + ? "Set a fixed focus point for this zoom" + : "Camera follows cursor automatically"} +

+
{ZOOM_DEPTH_OPTIONS.map((option) => { const isActive = selectedZoomDepth === option.depth;