diff options
Diffstat (limited to 'apps/web/src/stores')
| -rw-r--r-- | apps/web/src/stores/timeline-store.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index 9a2c7361..c85f5bd2 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -74,6 +74,7 @@ interface TimelineStore { clickOffsetTime: number; currentTime: number; }; + justFinishedDragging: boolean; setDragState: (dragState: Partial<TimelineStore["dragState"]>) => void; startDrag: ( elementId: string, @@ -230,6 +231,8 @@ export const useTimelineStore = create<TimelineStore>((set, get) => { // Snapping settings defaults snappingEnabled: true, + justFinishedDragging: false, + getSortedTracks: () => { const { _tracks } = get(); const tracksWithMain = ensureMainTrack(_tracks); @@ -938,7 +941,12 @@ export const useTimelineStore = create<TimelineStore>((set, get) => { clickOffsetTime: 0, currentTime: 0, }, + justFinishedDragging: true, }); + + setTimeout(() => { + set({ justFinishedDragging: false }); + }, 50); }, // Persistence methods |
