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