From f04f7570cc7d468cc586d0a8d5a5c03b611d42c6 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 13 Mar 2025 13:53:21 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8F=99=EC=84=9C=EB=82=A8=EB=B6=81=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 50d11cb9..4f0bb116 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -1662,11 +1662,11 @@ export const useTrestle = () => { break } case 'west': { - startPointX += 5 + startPointX -= 5 break } case 'north': { - startPointY += 5 + startPointY -= 5 break } } @@ -1686,14 +1686,15 @@ export const useTrestle = () => { }) canvas.add(bracket) canvas.renderAll() + const maxIntvl = Math.max(moduleIntvlHor, moduleIntvlVer) if (direction === 'south') { - startPointY -= height + moduleIntvlVer / 10 + startPointY -= height + maxIntvl / 10 } else if (direction === 'north') { - startPointY += height + moduleIntvlVer / 10 + startPointY += height + maxIntvl / 10 } else if (direction === 'east') { - startPointX -= width - moduleIntvlHor / 10 + startPointX -= width + maxIntvl / 10 } else if (direction === 'west') { - startPointX += width + moduleIntvlHor / 10 + startPointX += width + maxIntvl / 10 } } }