mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
21 lines
471 B
TypeScript
21 lines
471 B
TypeScript
import { Command } from "@/lib/commands/base-command";
|
|
import type { TimelineTrack } from "@/lib/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);
|
|
}
|
|
}
|