From 9af16ac047eea1b84c868d0fd50f1414a09d6267 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 11 Nov 2025 17:20:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=88=98=EB=8F=99=EC=A7=80=EB=B6=95?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=95=88=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useMode.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hooks/useMode.js b/src/hooks/useMode.js index 6030f43f..8eebe849 100644 --- a/src/hooks/useMode.js +++ b/src/hooks/useMode.js @@ -1809,6 +1809,7 @@ export function useMode() { const currentWall = line.currentWall const nextWall = line.nextWall const index = line.index + addPoint + const direction = currentWall.direction const xDiff = Big(currentWall.x1).minus(Big(nextWall.x1)) const yDiff = Big(currentWall.y1).minus(Big(nextWall.y1)) const offsetCurrentPoint = offsetPolygon[index] @@ -1820,12 +1821,10 @@ export function useMode() { x: xDiff.eq(0) ? offsetCurrentPoint.x : nextWall.x1, y: yDiff.eq(0) ? offsetCurrentPoint.y : nextWall.y1, } - let diffOffset - if (nextWall.index > currentWall.index) { - diffOffset = Big(nextWall.attributes.offset).minus(Big(currentWall.attributes.offset)).abs() - } else { - diffOffset = Big(currentWall.attributes.offset).minus(Big(nextWall.attributes.offset)) - } + + let diffOffset = ['top', 'right'].includes(direction) + ? Big(nextWall.attributes.offset).minus(Big(currentWall.attributes.offset)) + : Big(currentWall.attributes.offset).minus(Big(nextWall.attributes.offset)) const offsetPoint2 = { x: yDiff.eq(0) ? offsetPoint1.x : Big(offsetPoint1.x).plus(diffOffset).toNumber(), -- 2.47.2 From f63202877f3afb5132de3c9d0a40126abcfa6afa Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 18 Nov 2025 13:11:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[1314][HANASYS=20DESIGN]Simulation=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=9D=98=20=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4=EC=84=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/simulator/Simulator.jsx | 4 ++-- src/hooks/module/useTrestle.js | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/simulator/Simulator.jsx b/src/components/simulator/Simulator.jsx index 5d6a7e3d..9831d1b3 100644 --- a/src/components/simulator/Simulator.jsx +++ b/src/components/simulator/Simulator.jsx @@ -270,9 +270,9 @@ export default function Simulator() { setPwrGnrSimType(e.target.value) }} > - + {/**/} - + {/**/} diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 73fb92f8..0f8c04d3 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -743,7 +743,19 @@ export const useTrestle = () => { if (!data || data.length === 0) { return } - itemList = data + //itemList = data +// itemList에 northModuleYn 추가 + itemList = data.map(item => { + if (item.itemTpCd === "MODULE") { + const matchedModule = modules.find(module => module.moduleItemId === item.itemId); + return { + ...item, + northModuleYn: matchedModule?.northModuleYn || 'N' + }; + } + return item; + }); + //northArrangement 북면 설치 여부 const northArrangement = getNorthArrangement() @@ -2586,6 +2598,7 @@ export const useTrestle = () => { return { moduleTpCd: module.moduleInfo.itemTp, moduleItemId: module.moduleInfo.itemId, + northModuleYn: module?.moduleInfo?.northModuleYn || 'N' // 기본값 'N' } }) @@ -2597,6 +2610,7 @@ export const useTrestle = () => { moduleTpCd: cur.moduleTpCd, moduleItemId: cur.moduleItemId, cnt: 0, + northModuleYn: cur.northModuleYn } } acc[key].cnt++ @@ -2609,6 +2623,11 @@ export const useTrestle = () => { moduleTpCd: groupedParam.moduleTpCd, moduleItemId: groupedParam.moduleItemId, moduleCnt: groupedParam.cnt, + northModuleYn: groupedParam.northModuleYn + // northModuleYn: params.find(p => + // p.moduleTpCd === groupedParam.moduleTpCd && + // p.moduleItemId === groupedParam.moduleItemId + // )?.northModuleYn || 'N' } }) } -- 2.47.2