summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/commands/timeline/element/move-elements.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/lib/commands/timeline/element/move-elements.ts')
-rw-r--r--apps/web/src/lib/commands/timeline/element/move-elements.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/web/src/lib/commands/timeline/element/move-elements.ts b/apps/web/src/lib/commands/timeline/element/move-elements.ts
index 533c85b4..782374d5 100644
--- a/apps/web/src/lib/commands/timeline/element/move-elements.ts
+++ b/apps/web/src/lib/commands/timeline/element/move-elements.ts
@@ -1,4 +1,8 @@
-import { Command, type CommandResult } from "@/lib/commands/base-command";
+import {
+ Command,
+ createElementSelectionResult,
+ type CommandResult,
+} from "@/lib/commands/base-command";
import { EditorCore } from "@/core";
import type {
SceneTracks,
@@ -114,12 +118,12 @@ export class MoveElementCommand extends Command {
});
editor.timeline.updateTracks(updatedTracks);
- return {
- select: this.moves.map(({ elementId, targetTrackId }) => ({
+ return createElementSelectionResult(
+ this.moves.map(({ elementId, targetTrackId }) => ({
trackId: targetTrackId,
elementId,
})),
- };
+ );
}
undo(): void {