diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-31 22:53:16 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-31 22:53:16 +0200 |
| commit | f8fb238b228881ef970739b7d884912058b41347 (patch) | |
| tree | e784085f29377242c5d1441ec46b397ada5170ef /apps/web/src/lib/commands/base-command.ts | |
| parent | 0f5dca4f12d926ec0015116e85ec1129a6891f40 (diff) | |
| download | opencut-f8fb238b228881ef970739b7d884912058b41347.tar.gz | |
feat: centralize selection management
Diffstat (limited to 'apps/web/src/lib/commands/base-command.ts')
| -rw-r--r-- | apps/web/src/lib/commands/base-command.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/web/src/lib/commands/base-command.ts b/apps/web/src/lib/commands/base-command.ts index 66062c52..a8ce1d34 100644 --- a/apps/web/src/lib/commands/base-command.ts +++ b/apps/web/src/lib/commands/base-command.ts @@ -1,11 +1,17 @@ +import type { ElementRef } from "@/lib/timeline/types"; + +export interface CommandResult { + select?: ElementRef[]; +} + export abstract class Command { - abstract execute(): void; + abstract execute(): CommandResult | undefined; undo(): void { throw new Error("Undo not implemented for this command"); } - redo(): void { - this.execute(); + redo(): CommandResult | undefined { + return this.execute(); } } |
