From 1fca294089ee75140802bea9d10097a9777b2658 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 11 Feb 2025 14:08:36 +0900 Subject: [PATCH] =?UTF-8?q?topRightPoint=20=EA=B2=80=EC=83=89=20=EB=B2=94?= =?UTF-8?q?=EC=9C=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 3e6adaab..2c9e43ad 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -873,7 +873,7 @@ export const useTrestle = () => { } case 'east': { widthArr.forEach((w) => { - topRightPoint = { x: x + w, y: y + height / 2 } + topRightPoint = { x: x - w, y: y - height / 2 } if (result) return result = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - topRightPoint.x) < maxX && Math.abs(centerPoint.y - topRightPoint.y) < maxY, @@ -883,7 +883,7 @@ export const useTrestle = () => { } case 'west': { widthArr.forEach((w) => { - topRightPoint = { x: x - w, y: y - height / 2 } + topRightPoint = { x: x + w, y: y + height / 2 } if (result) return result = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - topRightPoint.x) < maxX && Math.abs(centerPoint.y - topRightPoint.y) < maxY,