diff options
| author | Maze <mazewinther@gmail.com> | 2026-04-05 13:37:29 +0200 |
|---|---|---|
| committer | Maze <mazewinther@gmail.com> | 2026-04-05 13:37:29 +0200 |
| commit | 099746633183cd061fc89a63aeb9fcfb909f6db2 (patch) | |
| tree | 0878ba5b8c8549665c0368d54488a4c8b7c469f3 /apps/web/src/components/editor/panels | |
| parent | 1bd9fac203f09736c1225bbbe19e5d7cc31c0b93 (diff) | |
| download | opencut-099746633183cd061fc89a63aeb9fcfb909f6db2.tar.gz | |
fix: subscribe to playback time so keyframe button updates on frame change
Made-with: Cursor
Diffstat (limited to 'apps/web/src/components/editor/panels')
| -rw-r--r-- | apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts b/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts index 95f338e1..a900cb13 100644 --- a/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts +++ b/apps/web/src/components/editor/panels/properties/hooks/use-element-playhead.ts @@ -9,8 +9,7 @@ export function useElementPlayhead({ startTime: number;
duration: number;
}) {
- const editor = useEditor();
- const playheadTime = editor.playback.getCurrentTime();
+ const playheadTime = useEditor((editor) => editor.playback.getCurrentTime());
const localTime = getElementLocalTime({
timelineTime: playheadTime,
elementStartTime: startTime,
|
