blob: 5b6d871abf9f83eaad33f2ee4b7e6dbec9500841 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { Command, type CommandResult } from "@/commands/base-command";
import type { SceneTracks } from "@/timeline";
import { EditorCore } from "@/core";
export class TracksSnapshotCommand extends Command {
constructor(
private before: SceneTracks,
private after: SceneTracks,
) {
super();
}
execute(): CommandResult | undefined {
EditorCore.getInstance().timeline.updateTracks(this.after);
return undefined;
}
undo(): void {
EditorCore.getInstance().timeline.updateTracks(this.before);
}
}
|