From 0cb298d20bd7a53672dc550298ba9014c80c0e3c Mon Sep 17 00:00:00 2001 From: moncef Date: Tue, 7 Apr 2026 11:58:45 +0100 Subject: [PATCH] Fix Pr reviews --- src/components/video-editor/SettingsPanel.tsx | 9 ++-- src/components/video-editor/VideoEditor.tsx | 4 +- src/components/video-editor/timeline/Item.tsx | 49 +++++++++++++------ .../videoPlayback/zoomRegionUtils.ts | 11 +++-- 4 files changed, 48 insertions(+), 25 deletions(-) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 34adddd..e45f439 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -166,7 +166,6 @@ const ZOOM_DEPTH_OPTIONS: Array<{ depth: ZoomDepth; label: string }> = [ { depth: 6, label: "5×" }, ]; -// TODO: make this configurable const ZOOM_SPEED_OPTIONS = [ { label: "Instant", zoomIn: 0, zoomOut: 0 }, { label: "Fast", zoomIn: 500, zoomOut: 350 }, @@ -570,8 +569,10 @@ export function SettingsPanel({
{ZOOM_SPEED_OPTIONS.map((opt) => { const isActive = - selectedZoomInDuration === opt.zoomIn && - selectedZoomOutDuration === opt.zoomOut; + selectedZoomInDuration !== undefined && + selectedZoomOutDuration !== undefined && + Math.round(selectedZoomInDuration) === Math.round(opt.zoomIn) && + Math.round(selectedZoomOutDuration) === Math.round(opt.zoomOut); return (