The open-source CapCut alternative
feat: replace setRippleEditingEnabled with toggleRippleEditing method
Anwarul Islam63e07dc9ffde
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.tsindex 5fe53c6a..ac4e613e 100644--- a/apps/web/src/stores/timeline-store.ts+++ b/apps/web/src/stores/timeline-store.ts@@ -56,7 +56,7 @@ interface TimelineStore {// Ripple editing moderippleEditingEnabled: boolean;- setRippleEditingEnabled: (enabled: boolean) => void;+ toggleRippleEditing: () => void;// Multi-selectionselectedElements: { trackId: string; elementId: string }[];@@ -308,9 +308,6 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {setSelectedElements: (elements) => set({ selectedElements: elements }),- setRippleEditingEnabled: (enabled) =>- set({ rippleEditingEnabled: enabled }),-addTrack: (type) => {get().pushHistory();@@ -1145,6 +1142,12 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {},// Ripple editing functions+ toggleRippleEditing: () => {+ set((state) => ({+ rippleEditingEnabled: !state.rippleEditingEnabled,+ }));+ },+updateElementStartTimeWithRipple: (trackId, elementId, newStartTime) => {const { _tracks, rippleEditingEnabled } = get();