From 904b7afd3869fc8f93419b387fa63780bb80ab0e Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 4 Jun 2025 10:35:14 +0900 Subject: [PATCH] =?UTF-8?q?#1085=20=E3=80=90HANASYS=20DESIGN=E3=80=91?= =?UTF-8?q?=E6=9E=B6=E5=8F=B0=E8=A1=A8=E7=A4=BA=E3=81=AE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=20=EC=A7=80=EC=A7=80?= =?UTF-8?q?=EA=B8=88=EA=B5=AC=20=EC=9C=84=EC=B9=98=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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 8a41149d..0aea8bfc 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -1627,6 +1627,8 @@ export const useTrestle = () => { // 랙 없음의 지지금구를 그린다. const drawBracketWithOutRack = (module, rackIntvlPct, count, l, direction, moduleIntvlHor, moduleIntvlVer) => { const { leftFindModuleList, rightFindModuleList, centerFindModuleList } = module + rackIntvlPct = rackIntvlPct === 0 ? 1 : rackIntvlPct // 0인 경우 1로 변경 + rackIntvlPct = 100 / rackIntvlPct // 퍼센트로 변경 let { width, height, left, top } = module let startPointX @@ -1641,14 +1643,14 @@ export const useTrestle = () => { break } else if (direction === 'east') { startPointX = left + width - startPointY = top + height - height / rackIntvlPct + startPointY = top + height - height / rackIntvlPct - 10 break } else if (direction === 'west') { startPointX = left startPointY = top + height / rackIntvlPct break } else if (direction === 'north') { - startPointX = left + width - width / rackIntvlPct + startPointX = left + width - width / rackIntvlPct - 10 startPointY = top break } @@ -1657,7 +1659,7 @@ export const useTrestle = () => { case 'R': { // 오른쪽부분 시작 점 if (direction === 'south') { - startPointX = left + width - width / rackIntvlPct + startPointX = left + width - width / rackIntvlPct - 10 startPointY = top + height / 2 + height / 2 break } else if (direction === 'east') { @@ -1666,7 +1668,7 @@ export const useTrestle = () => { break } else if (direction === 'west') { startPointX = left - startPointY = top + height - height / rackIntvlPct + startPointY = top + height - height / rackIntvlPct - 10 break } else if (direction === 'north') { startPointX = left + width / rackIntvlPct