diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-05-02 01:33:20 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-05-02 03:27:23 +0200 |
| commit | 23187b0b6a9f179bdb68578fc4bdaa8414b8316d (patch) | |
| tree | 67b433f07fc316d95c997a48d57cb46b8780b9fc /apps/web/src/preview | |
| parent | f66cdbfeb2e8b68e70e1f8595c38cacf58210ddf (diff) | |
| download | opencut-23187b0b6a9f179bdb68578fc4bdaa8414b8316d.tar.gz | |
refactor: remove dead tangent handle variant
The { kind: "tangent" } MaskHandleId variant was never constructed — neither
getFreeformDisplayHandles nor any other code ever produced a tangent handle
object. The in/out control-arm branches in computeFreeformParamUpdate, the
tangent case in maskHandleIdKey, and the CUSTOM_MASK_TANGENT_SIZE rendering
path in mask-handles.tsx were all unreachable. Removed all four dead paths
and removed "tangent" from MaskHandleKind.
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'apps/web/src/preview')
| -rw-r--r-- | apps/web/src/preview/components/mask-handles.tsx | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/apps/web/src/preview/components/mask-handles.tsx b/apps/web/src/preview/components/mask-handles.tsx index 99f80007..314984ef 100644 --- a/apps/web/src/preview/components/mask-handles.tsx +++ b/apps/web/src/preview/components/mask-handles.tsx @@ -17,7 +17,6 @@ import { } from "./handle-primitives"; const CUSTOM_MASK_ANCHOR_SIZE = 7; -const CUSTOM_MASK_TANGENT_SIZE = 6; import { Rotate01Icon, FeatherIcon } from "@hugeicons/core-free-icons"; export function MaskHandles({ @@ -258,25 +257,21 @@ export function MaskHandles({ ); } - if (handle.kind === "point" || handle.kind === "tangent") { - return ( - <CircleHandle - key={key} - screen={screen} - size={ - handle.kind === "tangent" - ? CUSTOM_MASK_TANGENT_SIZE - : CUSTOM_MASK_ANCHOR_SIZE - } - isSelected={handle.isSelected} - onPointerDown={(event) => - handleMaskPointerDown({ event, handleId: handle.id }) - } - onPointerMove={onPointerMove} - onPointerUp={onPointerUp} - /> - ); - } + if (handle.kind === "point") { + return ( + <CircleHandle + key={key} + screen={screen} + size={CUSTOM_MASK_ANCHOR_SIZE} + isSelected={handle.isSelected} + onPointerDown={(event) => + handleMaskPointerDown({ event, handleId: handle.id }) + } + onPointerMove={onPointerMove} + onPointerUp={onPointerUp} + /> + ); + } if (handle.kind === "corner") { return ( |
