From f66cdbfeb2e8b68e70e1f8595c38cacf58210ddf Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sat, 2 May 2026 01:28:19 +0200 Subject: fix: address review findings in masks substrate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove dead ternary in getPreferredEdges (always returned undefined; the all-false object was never reached by Object.values().some(Boolean)) - Document why drawWithFeather descriptors zero the feather field in the compositor (analytical renderer handles softness itself; zeroing prevents a second JFA feather pass) - Remove legacyType from V30→V31 migration (not consumed anywhere; a down-migration can map type:"freeform" back to "custom" directly) - Add V30→V31 test coverage: skip-guard branches, freeform passthrough, elements without a masks array - Add snap tests for vertical-edge (bottom) and uniform-scale handle paths Co-authored-by: Cursor --- apps/web/src/masks/snap.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'apps/web/src/masks/snap.ts') diff --git a/apps/web/src/masks/snap.ts b/apps/web/src/masks/snap.ts index 85949823..519783a9 100644 --- a/apps/web/src/masks/snap.ts +++ b/apps/web/src/masks/snap.ts @@ -55,16 +55,7 @@ function getPreferredEdges({ }; } - const preferredEdges = { - left: false, - right: false, - top: false, - bottom: false, - } satisfies ScaleEdgePreference; - - return Object.values(preferredEdges).some(Boolean) - ? preferredEdges - : undefined; + return undefined; } function snapMaskPosition({ -- cgit v1.3.1