topRightPoint 검색 범위 수정

This commit is contained in:
hyojun.choi 2025-02-11 14:08:36 +09:00
parent b4f2272a6b
commit 1fca294089

View File

@ -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,