fix: clips duplicating when moving them around
This commit is contained in:
@ -903,6 +903,7 @@ function TimelineTrackContent({
|
|||||||
|
|
||||||
const handleTrackDrop = (e: React.DragEvent) => {
|
const handleTrackDrop = (e: React.DragEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
// Reset all drag states
|
// Reset all drag states
|
||||||
dragCounterRef.current = 0;
|
dragCounterRef.current = 0;
|
||||||
@ -985,7 +986,6 @@ function TimelineTrackContent({
|
|||||||
updateClipStartTime(track.id, clipId, snappedTime);
|
updateClipStartTime(track.id, clipId, snappedTime);
|
||||||
} else {
|
} else {
|
||||||
// Moving to different track
|
// Moving to different track
|
||||||
console.log('Moving clip from', fromTrackId, 'to', track.id);
|
|
||||||
moveClipToTrack(fromTrackId, track.id, clipId);
|
moveClipToTrack(fromTrackId, track.id, clipId);
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
updateClipStartTime(track.id, clipId, snappedTime);
|
updateClipStartTime(track.id, clipId, snappedTime);
|
||||||
|
Reference in New Issue
Block a user