summaryrefslogtreecommitdiff
path: root/apps/web/src/masks/__tests__/snap.test.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-29 18:23:08 +0200
committerMaze Winther <mazewinther@gmail.com>2026-05-02 03:27:23 +0200
commit6ea5a156b6b7f609354a4563cfb2d00ec7f41811 (patch)
treee91a5e474867f5c37299cfe96a99ee24cc0a5866 /apps/web/src/masks/__tests__/snap.test.ts
parent401cc35743aafc4c8bdfb8055501650390bde88b (diff)
downloadopencut-6ea5a156b6b7f609354a4563cfb2d00ec7f41811.tar.gz
refactor: split mask snap dispatch
Made-with: Cursor
Diffstat (limited to 'apps/web/src/masks/__tests__/snap.test.ts')
-rw-r--r--apps/web/src/masks/__tests__/snap.test.ts12
1 files changed, 6 insertions, 6 deletions
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({