Open source CapCut alternative.
TypeScript
fix(site): hide selection chrome while hover-scrubbing the preview
David Le0b842922f07a
diff --git a/site/src/cut/components/OverlayLayer.tsx b/site/src/cut/components/OverlayLayer.tsxindex 9e010d65..76114b32 100644--- a/site/src/cut/components/OverlayLayer.tsx+++ b/site/src/cut/components/OverlayLayer.tsx@@ -160,7 +160,9 @@ export function OverlayLayer({ stageWidth }: { stageWidth: number }) {<OverlayItemkey={o.id}overlay={o}- selected={selected}+ // The skimmer paints the bare frame: the item still renders, its+ // selection chrome (outline, resize handle) does not.+ selected={selected && !scrubbing}ghost={!inRange && !selected}stageWidth={stageWidth}registerBox={registerBox}diff --git a/site/src/cut/components/Preview.tsx b/site/src/cut/components/Preview.tsxindex bebe426e..ad423a3a 100644--- a/site/src/cut/components/Preview.tsx+++ b/site/src/cut/components/Preview.tsx@@ -229,6 +229,11 @@ function OverlayPipHandle({ stage }: { stage: { w: number; h: number } }) {const selection = useEditor((s) => s.selection);const clips = useEditor((s) => s.clips);const currentTime = useEditor((s) => s.currentTime);+ const skimTime = useEditor((s) => s.skimTime);+ const playing = useEditor((s) => s.playing);+ // While hover-scrubbing the preview shows the skimmer's frame, where the+ // selected clip may not even be on screen — selection stays, the handle hides.+ if (!playing && skimTime !== null) return null;// Resolve the selected, live, regioned clip (any track) plus how to patch its// rect. A clip's own footprint equals its span length, so one path serves