summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor
diff options
context:
space:
mode:
authorDevloperAmanSingh <amansinghneh211205@gmail.com>2025-06-26 23:46:33 +0530
committerDevloperAmanSingh <amansinghneh211205@gmail.com>2025-06-26 23:46:33 +0530
commit7ca5bcfa50e58e4a661072a5561b1e548f1dfed7 (patch)
tree257232b4293f376bbdd4ace33c22d42f44314253 /apps/web/src/components/editor
parentefdd2aa6edd092ff81d6d7cf38e57cc5b58df285 (diff)
downloadopencut-7ca5bcfa50e58e4a661072a5561b1e548f1dfed7.tar.gz
feat: add comments for drag handling and resizing in timeline clip component
Diffstat (limited to 'apps/web/src/components/editor')
-rw-r--r--apps/web/src/components/editor/timeline-clip.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/web/src/components/editor/timeline-clip.tsx b/apps/web/src/components/editor/timeline-clip.tsx
index b5b8d20a..6b974118 100644
--- a/apps/web/src/components/editor/timeline-clip.tsx
+++ b/apps/web/src/components/editor/timeline-clip.tsx
@@ -58,6 +58,7 @@ export function TimelineClip({
const effectiveDuration = clip.duration - clip.trimStart - clip.trimEnd;
const clipWidth = Math.max(80, effectiveDuration * 50 * zoomLevel);
+ // Use real-time position during drag, otherwise use stored position
const isBeingDragged = dragState.clipId === clip.id;
const clipStartTime =
isBeingDragged && dragState.isDragging
@@ -78,6 +79,7 @@ export function TimelineClip({
}
};
+ // Resize handles for trimming clips
const handleResizeStart = (
e: React.MouseEvent,
clipId: string,
@@ -329,6 +331,7 @@ export function TimelineClip({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-56">
+ {/* Split operations - only available when playhead is within clip */}
<DropdownMenuSub>
<DropdownMenuSubTrigger disabled={!canSplitAtPlayhead()}>
<Scissors className="mr-2 h-4 w-4" />
@@ -350,6 +353,7 @@ export function TimelineClip({
</DropdownMenuSubContent>
</DropdownMenuSub>
+ {/* Audio separation - only available for video clips */}
{canSeparateAudio() && (
<>
<DropdownMenuSeparator />