From 6ea5a156b6b7f609354a4563cfb2d00ec7f41811 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 29 Apr 2026 18:23:08 +0200 Subject: refactor: split mask snap dispatch Made-with: Cursor --- apps/web/src/masks/__tests__/snap.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/web/src/masks/__tests__/snap.test.ts') diff --git a/apps/web/src/masks/__tests__/snap.test.ts b/apps/web/src/masks/__tests__/snap.test.ts index 2f33615f..510c6a27 100644 --- a/apps/web/src/masks/__tests__/snap.test.ts +++ b/apps/web/src/masks/__tests__/snap.test.ts @@ -13,7 +13,7 @@ import { import { getSplitMaskStrokeSegment } from "@/masks/definitions/split"; import { textMaskDefinition } from "@/masks/definitions/text"; import { getMaskSnapGeometry } from "@/masks/geometry"; -import { snapMaskInteraction } from "@/masks/snap"; +import { snapBoxMaskInteraction, snapSplitMaskInteraction } from "@/masks/snap"; import type { ElementBounds } from "@/preview/element-bounds"; import type { CustomMaskParams, @@ -230,7 +230,7 @@ describe("mask geometry", () => { describe("mask snapping", () => { test("snaps split mask movement using the shared position pipeline", () => { - const result = snapMaskInteraction({ + const result = snapSplitMaskInteraction({ handleId: "position", startParams: buildSplitParams({ centerX: 0.03, @@ -254,7 +254,7 @@ describe("mask snapping", () => { }); test("snaps box mask movement against element center and edges", () => { - const result = snapMaskInteraction({ + const result = snapBoxMaskInteraction({ handleId: "position", startParams: buildRectangleParams(), proposedParams: buildRectangleParams({ @@ -275,7 +275,7 @@ describe("mask snapping", () => { }); test("snaps mask rotation through the shared rotation path", () => { - const result = snapMaskInteraction({ + const result = snapBoxMaskInteraction({ handleId: "rotation", startParams: buildRectangleParams(), proposedParams: buildRectangleParams({ @@ -291,7 +291,7 @@ describe("mask snapping", () => { }); test("snaps edge resize for box masks", () => { - const result = snapMaskInteraction({ + const result = snapBoxMaskInteraction({ handleId: "right", startParams: buildRectangleParams(), proposedParams: buildRectangleParams({ @@ -307,7 +307,7 @@ describe("mask snapping", () => { }); test("snaps corner resize for box masks", () => { - const result = snapMaskInteraction({ + const result = snapBoxMaskInteraction({ handleId: "bottom-right", startParams: buildRectangleParams(), proposedParams: buildRectangleParams({ -- cgit v1.3.1