summaryrefslogtreecommitdiff
path: root/apps/web
diff options
context:
space:
mode:
authorHyteq <DerpsDer.es@gmail.com>2025-06-23 14:19:56 +0300
committerHyteq <DerpsDer.es@gmail.com>2025-06-23 14:19:56 +0300
commitc8e522a82f4e8c2e6f9eb90f22a28f947dc7fe41 (patch)
tree54a96a40a7fa292391502c8a9ab823d12ddec147 /apps/web
parent3540226af59481aa304dadc041071b74ba7dbcf5 (diff)
downloadopencut-c8e522a82f4e8c2e6f9eb90f22a28f947dc7fe41.tar.gz
fix: items duplicate instead of moving t racks
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/src/components/editor/timeline.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx
index 50a64dbb..3823f096 100644
--- a/apps/web/src/components/editor/timeline.tsx
+++ b/apps/web/src/components/editor/timeline.tsx
@@ -64,7 +64,7 @@ export function Timeline() {
const handleDragEnter = (e: React.DragEvent) => {
// When something is dragged over the timeline, show overlay
e.preventDefault();
- // Don't show overlay for timeline clips or other internal drags
+ // Don't show overlay for timeline clips - they're handled by tracks
if (e.dataTransfer.types.includes("application/x-timeline-clip")) {
return;
}
@@ -81,7 +81,7 @@ export function Timeline() {
const handleDragLeave = (e: React.DragEvent) => {
e.preventDefault();
- // Don't update state for timeline clips
+ // Don't update state for timeline clips - they're handled by tracks
if (e.dataTransfer.types.includes("application/x-timeline-clip")) {
return;
}
@@ -98,6 +98,12 @@ export function Timeline() {
setIsDragOver(false);
dragCounterRef.current = 0;
+ // Ignore timeline clip drags - they're handled by track-specific handlers
+ const hasTimelineClip = e.dataTransfer.types.includes("application/x-timeline-clip");
+ if (hasTimelineClip) {
+ return;
+ }
+
const mediaItemData = e.dataTransfer.getData("application/x-media-item");
if (mediaItemData) {
// Handle media item drops by creating new tracks