From 8e737d87e0accbf1d433f4c8b1e8e0f125849799 Mon Sep 17 00:00:00 2001 From: Kha Nguyen Date: Thu, 24 Jul 2025 17:04:27 -0500 Subject: Revert "merge main" This reverts commit 1ccacf6bb5db579cf6f343d9de57bce92d296f5f. --- apps/web/src/components/editor/timeline/index.tsx | 27 +++++++++-------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'apps/web/src/components/editor/timeline/index.tsx') diff --git a/apps/web/src/components/editor/timeline/index.tsx b/apps/web/src/components/editor/timeline/index.tsx index fd2b2a11..2360eb8a 100644 --- a/apps/web/src/components/editor/timeline/index.tsx +++ b/apps/web/src/components/editor/timeline/index.tsx @@ -278,7 +278,7 @@ export function Timeline() { Math.min( duration, (mouseX + scrollLeft) / - (TIMELINE_CONSTANTS.PIXELS_PER_SECOND * zoomLevel) + (TIMELINE_CONSTANTS.PIXELS_PER_SECOND * zoomLevel) ) ); @@ -501,9 +501,7 @@ export function Timeline() { return (
setIsInTimeline(true)} onMouseLeave={() => setIsInTimeline(false)} @@ -600,21 +598,19 @@ export function Timeline() { return (
{(() => { const formatTime = (seconds: number) => { @@ -624,14 +620,13 @@ export function Timeline() { if (hours > 0) { return `${hours}:${minutes.toString().padStart(2, "0")}:${Math.floor(secs).toString().padStart(2, "0")}`; - } - if (minutes > 0) { + } else if (minutes > 0) { return `${minutes}:${Math.floor(secs).toString().padStart(2, "0")}`; - } - if (interval >= 1) { + } else if (interval >= 1) { return `${Math.floor(secs)}s`; + } else { + return `${secs.toFixed(1)}s`; } - return `${secs.toFixed(1)}s`; }; return formatTime(time); })()} @@ -714,7 +709,7 @@ export function Timeline() { }} > {tracks.length === 0 ? ( -
+
) : ( <> {tracks.map((track, index) => ( -- cgit v1.3.1