feat: basic ripple editing

This commit is contained in:
Maze Winther
2026-02-23 07:09:26 +01:00
parent 1762dc077d
commit 744419469d
7 changed files with 175 additions and 79 deletions
+11 -2
View File
@@ -140,12 +140,19 @@ export class TimelineManager {
elements,
splitTime,
retainSide = "both",
rippleEnabled = false,
}: {
elements: { trackId: string; elementId: string }[];
splitTime: number;
retainSide?: "both" | "left" | "right";
rippleEnabled?: boolean;
}): { trackId: string; elementId: string }[] {
const command = new SplitElementsCommand(elements, splitTime, retainSide);
const command = new SplitElementsCommand(
elements,
splitTime,
retainSide,
rippleEnabled,
);
this.editor.command.execute({ command });
return command.getRightSideElements();
}
@@ -194,10 +201,12 @@ export class TimelineManager {
deleteElements({
elements,
rippleEnabled = false,
}: {
elements: { trackId: string; elementId: string }[];
rippleEnabled?: boolean;
}): void {
const command = new DeleteElementsCommand(elements);
const command = new DeleteElementsCommand(elements, rippleEnabled);
this.editor.command.execute({ command });
}