mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: basic ripple editing
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user