diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-26 20:44:07 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-26 20:44:07 +0200 |
| commit | 6b1f38a9a31a0eedaa7abea70f232960469351d5 (patch) | |
| tree | 4050d69056c1d9f14075b784535e2b33719f477b /apps/web/src/core | |
| parent | 56ca09692a308b22455420d11376ff8d41244c47 (diff) | |
| parent | 0b7597b31fa956c7f3d4838923b545ba5e341422 (diff) | |
| download | opencut-6b1f38a9a31a0eedaa7abea70f232960469351d5.tar.gz | |
refactor: split animation helpers by domain
Diffstat (limited to 'apps/web/src/core')
| -rw-r--r-- | apps/web/src/core/managers/playback-manager.ts | 20 | ||||
| -rw-r--r-- | apps/web/src/core/managers/timeline-manager.ts | 2 |
2 files changed, 5 insertions, 17 deletions
diff --git a/apps/web/src/core/managers/playback-manager.ts b/apps/web/src/core/managers/playback-manager.ts index 8275344f..9b9d26bc 100644 --- a/apps/web/src/core/managers/playback-manager.ts +++ b/apps/web/src/core/managers/playback-manager.ts @@ -75,7 +75,7 @@ export class PlaybackManager { this.playbackStartTime = this.currentTime; } this.notify(); - this.dispatchSeekEvent(this.currentTime); + this.notifySeek(this.currentTime); } setVolume({ volume }: { volume: number }): void { @@ -227,9 +227,9 @@ export class PlaybackManager { this.pause(); this.currentTime = maxTime; this.notify(); - this.notifySeek(maxTime); - this.dispatchSeekEvent(maxTime); - return; + this.notifySeek(maxTime); + this.dispatchSeekEvent(maxTime); + return; } this.currentTime = newTime; @@ -247,23 +247,11 @@ export class PlaybackManager { if (typeof window === "undefined") { return; } - - window.dispatchEvent( - new CustomEvent("playback-seek", { - detail: { time }, - }), - ); } private dispatchUpdateEvent(time: MediaTime): void { if (typeof window === "undefined") { return; } - - window.dispatchEvent( - new CustomEvent("playback-update", { - detail: { time }, - }), - ); } } diff --git a/apps/web/src/core/managers/timeline-manager.ts b/apps/web/src/core/managers/timeline-manager.ts index 3c6b7599..8fbfdb08 100644 --- a/apps/web/src/core/managers/timeline-manager.ts +++ b/apps/web/src/core/managers/timeline-manager.ts @@ -25,9 +25,9 @@ import type { } from "@/animation/types"; import { getElementLocalTime, - resolveAnimationTarget, resolveAnimationPathValueAtTime, } from "@/animation"; +import { resolveAnimationTarget } from "@/timeline/animation-targets"; import { BatchCommand } from "@/commands"; import { AddTrackCommand, |
