From e50a817b97b87baa0cd8fdde0fdb5d607143c1c3 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sun, 8 Feb 2026 22:21:17 +0100 Subject: add transform + few fixes feat: transform feat: batch command fix: slider undo fix: timeline zoom perf refactor: make updateElement support multiple --- apps/web/src/lib/commands/batch-command.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apps/web/src/lib/commands/batch-command.ts (limited to 'apps/web/src/lib/commands/batch-command.ts') diff --git a/apps/web/src/lib/commands/batch-command.ts b/apps/web/src/lib/commands/batch-command.ts new file mode 100644 index 00000000..05b51d38 --- /dev/null +++ b/apps/web/src/lib/commands/batch-command.ts @@ -0,0 +1,25 @@ +import { Command } from "./base-command"; + +export class BatchCommand extends Command { + constructor(private commands: Command[]) { + super(); + } + + execute(): void { + for (const command of this.commands) { + command.execute(); + } + } + + undo(): void { + for (const command of [...this.commands].reverse()) { + command.undo(); + } + } + + redo(): void { + for (const command of this.commands) { + command.execute(); + } + } +} -- cgit v1.3.1