diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-01 01:13:14 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-01 01:13:14 +0200 |
| commit | 1a01871cfc7a6405ed1140c7ed415e170843e40d (patch) | |
| tree | be6251a9cddeacf8462e4daff0e05015ffda25a0 /apps/web/src/stores/timeline-store.ts | |
| parent | 9b37ce6610eeba26fc2b1b1d2589a7e9ba5e6c00 (diff) | |
| download | opencut-1a01871cfc7a6405ed1140c7ed415e170843e40d.tar.gz | |
refactor: update media processing to use width and height instead of aspect ratio
Diffstat (limited to 'apps/web/src/stores/timeline-store.ts')
| -rw-r--r-- | apps/web/src/stores/timeline-store.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index 9f98b320..01f4fea6 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -1,8 +1,7 @@ import { create } from "zustand"; import type { TrackType } from "@/types/timeline"; import { useEditorStore } from "./editor-store"; -import { useMediaStore } from "./media-store"; -import { toast } from "sonner"; +import { useMediaStore, getMediaAspectRatio } from "./media-store"; // Helper function to manage clip naming with suffixes const getClipNameWithSuffix = ( @@ -232,7 +231,9 @@ export const useTimelineStore = create<TimelineStore>((set, get) => ({ (mediaItem.type === "image" || mediaItem.type === "video") ) { const editorStore = useEditorStore.getState(); - editorStore.setCanvasSizeFromAspectRatio(mediaItem.aspectRatio); + editorStore.setCanvasSizeFromAspectRatio( + getMediaAspectRatio(mediaItem) + ); } } |
