From c87daa5e00bf096df292cab76aa0573396527aa3 Mon Sep 17 00:00:00 2001 From: Alan Trebugeais Date: Fri, 8 May 2026 15:28:44 +0200 Subject: [PATCH] fix CodeRabbit comments --- .../timeline/components/axis/TimelineAxis.tsx | 14 ++++++-------- .../components/toolbar/TimelineToolbar.tsx | 8 +++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx b/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx index a1bab326..4f169821 100644 --- a/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx +++ b/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx @@ -28,8 +28,8 @@ export default function TimelineAxis({ videoDurationMs, currentTimeMs }: Timelin const markerTimes = new Set(); const firstMarker = Math.ceil(visibleStart / intervalMs) * intervalMs; - for (let time = firstMarker; time <= maxTime; time += intervalMs) { - if (time >= visibleStart && time <= visibleEnd) markerTimes.add(Math.round(time)); + for (let time = firstMarker; time <= visibleEnd; time += intervalMs) { + markerTimes.add(Math.round(time)); } if (visibleStart <= maxTime) markerTimes.add(Math.round(visibleStart)); @@ -41,11 +41,9 @@ export default function TimelineAxis({ videoDurationMs, currentTimeMs }: Timelin const minorTicks: number[] = []; const minorInterval = intervalMs / 5; - for (let time = firstMarker; time <= maxTime; time += minorInterval) { - if (time >= visibleStart && time <= visibleEnd) { - const isMajor = Math.abs(time % intervalMs) < 1; - if (!isMajor) minorTicks.push(time); - } + for (let time = firstMarker; time <= visibleEnd; time += minorInterval) { + const isMajor = Math.abs(time % intervalMs) < 1; + if (!isMajor) minorTicks.push(time); } return { @@ -80,7 +78,7 @@ export default function TimelineAxis({ videoDurationMs, currentTimeMs }: Timelin flexDirection: "row", alignItems: "flex-end", [sideProperty]: `${offset}px`, - transform: "translateX(-50%)", + transform: direction === "rtl" ? "translateX(50%)" : "translateX(-50%)", }; return ( diff --git a/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx b/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx index fa7093c0..ba6ae732 100644 --- a/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx +++ b/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx @@ -118,7 +118,13 @@ export default function TimelineToolbar({
-