diff options
Diffstat (limited to 'apps/web/src/masks/freeform/definition.ts')
| -rw-r--r-- | apps/web/src/masks/freeform/definition.ts | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/apps/web/src/masks/freeform/definition.ts b/apps/web/src/masks/freeform/definition.ts index b657218d..ae30110e 100644 --- a/apps/web/src/masks/freeform/definition.ts +++ b/apps/web/src/masks/freeform/definition.ts @@ -257,7 +257,7 @@ function computeFreeformParamUpdate({ }; } - if (handleId.kind !== "anchor" && handleId.kind !== "tangent") { + if (handleId.kind !== "anchor") { return {}; } @@ -279,29 +279,11 @@ function computeFreeformParamUpdate({ path: updateFreeformPathMaskPoint({ points, pointId: handleId.pointId, - updater: (point) => { - if (handleId.kind === "anchor") { - return { - ...point, - x: localPoint.x, - y: localPoint.y, - }; - } - - if (handleId.side === "in") { - return { - ...point, - inX: localPoint.x - point.x, - inY: localPoint.y - point.y, - }; - } - - return { - ...point, - outX: localPoint.x - point.x, - outY: localPoint.y - point.y, - }; - }, + updater: (point) => ({ + ...point, + x: localPoint.x, + y: localPoint.y, + }), }), }; } |
