diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-18 16:01:35 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-18 16:01:35 +0200 |
| commit | 8bdc894690752b1a9b29beb98d128eb0eec27d42 (patch) | |
| tree | 8a7160ad15569ca7bc6e0c96867c7183cd3f0a46 /apps/web/src/lib/commands/base-command.ts | |
| parent | 0387bd4c80f699cf0272fa0165d3c86dceaf39dc (diff) | |
| download | opencut-8bdc894690752b1a9b29beb98d128eb0eec27d42.tar.gz | |
fix: migrate commands to CommandResult selection contract
Diffstat (limited to 'apps/web/src/lib/commands/base-command.ts')
| -rw-r--r-- | apps/web/src/lib/commands/base-command.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/web/src/lib/commands/base-command.ts b/apps/web/src/lib/commands/base-command.ts index 2d0d04b7..b244f2f3 100644 --- a/apps/web/src/lib/commands/base-command.ts +++ b/apps/web/src/lib/commands/base-command.ts @@ -1,9 +1,23 @@ import type { EditorSelectionPatch } from "@/lib/selection/editor-selection"; +import type { ElementRef } from "@/lib/timeline/types"; export interface CommandResult { selection?: EditorSelectionPatch; } +export function createElementSelectionResult( + selectedElements: ElementRef[], +): CommandResult { + return { + selection: { + selectedElements, + selectedKeyframes: [], + keyframeSelectionAnchor: null, + selectedMaskPoints: null, + }, + }; +} + export abstract class Command { abstract execute(): CommandResult | undefined; |
