Skip to content

The open-source CapCut alternative

feat: select element on insert

Maze Wintherb8979c65d435
diff --git a/apps/web/src/lib/commands/timeline/element/insert-element.ts b/apps/web/src/lib/commands/timeline/element/insert-element.ts
index 9f0bf941..b06631d8 100644
--- a/apps/web/src/lib/commands/timeline/element/insert-element.ts
+++ b/apps/web/src/lib/commands/timeline/element/insert-element.ts
@@ -109,6 +109,10 @@ export class InsertElementCommand extends Command {
}
editor.timeline.updateTracks(updatedTracks);
+
+ return {
+ select: [{ trackId: targetTrackId, elementId: this.elementId }],
+ };
}
undo(): void {