diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-05 06:41:59 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-05 06:41:59 +0200 |
| commit | 8bbb41a3cb7679d570fde3032e5bdc72b23d029b (patch) | |
| tree | 7b3085333503553f258deab5fbacad259c9bc872 /apps/web/src/hooks/use-aspect-ratio.ts | |
| parent | 1bed89d55f8301f94b69bc0859e85a28a0fe16af (diff) | |
| download | opencut-8bbb41a3cb7679d570fde3032e5bdc72b23d029b.tar.gz | |
fix: ts error causing audio waveform signal issue
Diffstat (limited to 'apps/web/src/hooks/use-aspect-ratio.ts')
| -rw-r--r-- | apps/web/src/hooks/use-aspect-ratio.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/web/src/hooks/use-aspect-ratio.ts b/apps/web/src/hooks/use-aspect-ratio.ts index e3e85141..4bc7cfd5 100644 --- a/apps/web/src/hooks/use-aspect-ratio.ts +++ b/apps/web/src/hooks/use-aspect-ratio.ts @@ -1,12 +1,17 @@ import { useEditorStore } from "@/stores/editor-store"; import { useMediaStore, getMediaAspectRatio } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; +import { useProjectStore } from "@/stores/project-store"; export function useAspectRatio() { - const { canvasSize, canvasMode, canvasPresets } = useEditorStore(); + const { canvasPresets } = useEditorStore(); + const { activeProject } = useProjectStore(); const { mediaItems } = useMediaStore(); const { tracks } = useTimelineStore(); + const canvasSize = activeProject?.canvasSize || { width: 1920, height: 1080 }; + const canvasMode = activeProject?.canvasMode || "preset"; + // Find the current preset based on canvas size const currentPreset = canvasPresets.find( (preset) => |
