summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline/timeline-track.tsx
diff options
context:
space:
mode:
authorZaka <149817565+ZakaHaceCosas@users.noreply.github.com>2025-08-15 23:01:18 +0200
committerGitHub <noreply@github.com>2025-08-15 23:01:18 +0200
commit7e4cd767622e3e1a09e76770ce800f4a541cf0e8 (patch)
treea7cc92bc6d1fe1686da096cb67e308cedc731f5a /apps/web/src/components/editor/timeline/timeline-track.tsx
parent033a9aa1bcc06ee82d611ac2c7deb5575c2fa803 (diff)
downloadopencut-7e4cd767622e3e1a09e76770ce800f4a541cf0e8.tar.gz
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 <mazewinther@gmail.com>
Diffstat (limited to 'apps/web/src/components/editor/timeline/timeline-track.tsx')
-rw-r--r--apps/web/src/components/editor/timeline/timeline-track.tsx8
1 files changed, 4 insertions, 4 deletions
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