From 7e4cd767622e3e1a09e76770ce800f4a541cf0e8 Mon Sep 17 00:00:00 2001 From: Zaka <149817565+ZakaHaceCosas@users.noreply.github.com> Date: Fri, 15 Aug 2025 23:01:18 +0200 Subject: feat: add an input so the user can go to a specific timestamp (#530) * feat: add an input so the user can go to a specific timestamp * fix: use TimeCode type for EditableTimecodeProps * cleanup --------- Co-authored-by: Maze Winther --- apps/web/src/components/editor/timeline/timeline-track.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/web/src/components/editor/timeline/timeline-track.tsx') diff --git a/apps/web/src/components/editor/timeline/timeline-track.tsx b/apps/web/src/components/editor/timeline/timeline-track.tsx index ff4797fb..5a037710 100644 --- a/apps/web/src/components/editor/timeline/timeline-track.tsx +++ b/apps/web/src/components/editor/timeline/timeline-track.tsx @@ -21,7 +21,7 @@ import { snapTimeToFrame, TIMELINE_CONSTANTS, } from "@/constants/timeline-constants"; -import { useProjectStore } from "@/stores/project-store"; +import { DEFAULT_FPS, useProjectStore } from "@/stores/project-store"; import { useTimelineSnapping, SnapPoint } from "@/hooks/use-timeline-snapping"; export function TimelineTrackContent({ @@ -70,7 +70,7 @@ export function TimelineTrackContent({ ) => { // Always apply frame snapping first const projectStore = useProjectStore.getState(); - const projectFps = projectStore.activeProject?.fps || 30; + const projectFps = projectStore.activeProject?.fps || DEFAULT_FPS; let finalTime = snapTimeToFrame(dropTime, projectFps); // Additionally apply element snapping if enabled @@ -156,7 +156,7 @@ export function TimelineTrackContent({ // Always apply frame snapping first const projectStore = useProjectStore.getState(); - const projectFps = projectStore.activeProject?.fps || 30; + const projectFps = projectStore.activeProject?.fps || DEFAULT_FPS; let finalTime = snapTimeToFrame(adjustedTime, projectFps); let snapPoint = null; @@ -704,7 +704,7 @@ export function TimelineTrackContent({ const newStartTime = mouseX / (TIMELINE_CONSTANTS.PIXELS_PER_SECOND * zoomLevel); const projectStore = useProjectStore.getState(); - const projectFps = projectStore.activeProject?.fps || 30; + const projectFps = projectStore.activeProject?.fps || DEFAULT_FPS; const snappedTime = snapTimeToFrame(newStartTime, projectFps); // Calculate drop position relative to tracks -- cgit v1.3.1