summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/panels
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-07 01:45:52 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-07 01:45:52 +0200
commit30709d7134a10ad5b39b7e6a48e15321e8f83522 (patch)
treee52904a7448f803341eba7678414c8a1eb7fa042 /apps/web/src/components/editor/panels
parent93a0afdf641af5e28b1ccbdd018034366e8baa91 (diff)
downloadopencut-30709d7134a10ad5b39b7e6a48e15321e8f83522.tar.gz
fix: fix timeline width calculation for tick-based time
Diffstat (limited to 'apps/web/src/components/editor/panels')
-rw-r--r--apps/web/src/components/editor/panels/timeline/index.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/web/src/components/editor/panels/timeline/index.tsx b/apps/web/src/components/editor/panels/timeline/index.tsx
index 4114ae2c..11abfd68 100644
--- a/apps/web/src/components/editor/panels/timeline/index.tsx
+++ b/apps/web/src/components/editor/panels/timeline/index.tsx
@@ -50,7 +50,7 @@ import {
getTimelineZoomMin,
getTimelinePaddingPx,
} from "@/lib/timeline";
-import { BASE_TIMELINE_PIXELS_PER_SECOND } from "@/lib/timeline/scale";
+import { timelineTimeToPixels } from "@/lib/timeline/pixel-utils";
import {
getTrackHeight,
getCumulativeHeightBefore,
@@ -340,8 +340,7 @@ export function Timeline() {
const containerWidth =
tracksContainerRef.current?.clientWidth || FALLBACK_CONTAINER_WIDTH;
- const contentWidth =
- timelineDuration * BASE_TIMELINE_PIXELS_PER_SECOND * zoomLevel;
+ const contentWidth = timelineTimeToPixels({ time: timelineDuration, zoomLevel });
const paddingPx = getTimelinePaddingPx({
containerWidth,
zoomLevel,