From 2897dc26e3cfa2e4dd95d04ac7a822b136e3927f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:41:28 +0900 Subject: [PATCH] =?UTF-8?q?Orientation=EC=97=90=EC=84=9C=20nextstep?= =?UTF-8?q?=EC=8B=9C=20compas=20=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/modal/basic/step/Orientation.jsx | 2 +- src/components/floor-plan/modal/basic/step/Trestle.jsx | 2 -- src/hooks/module/useModuleBasicSetting.js | 2 +- src/hooks/module/useOrientation.js | 6 +++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/floor-plan/modal/basic/step/Orientation.jsx b/src/components/floor-plan/modal/basic/step/Orientation.jsx index a6b54bd0..8eee35d3 100644 --- a/src/components/floor-plan/modal/basic/step/Orientation.jsx +++ b/src/components/floor-plan/modal/basic/step/Orientation.jsx @@ -125,7 +125,7 @@ export const Orientation = forwardRef((props, ref) => { setVerticalSnowCover(inputVerticalSnowCover) setSelectedSurfaceType(inputRoughness) setStandardWindSpeed(inputStandardWindSpeed) - nextStep() + nextStep(inputCompasDeg) setManagementState({ ...managementState, installHeight: inputInstallHeight, diff --git a/src/components/floor-plan/modal/basic/step/Trestle.jsx b/src/components/floor-plan/modal/basic/step/Trestle.jsx index 4c883512..6060d8c8 100644 --- a/src/components/floor-plan/modal/basic/step/Trestle.jsx +++ b/src/components/floor-plan/modal/basic/step/Trestle.jsx @@ -369,8 +369,6 @@ const Trestle = forwardRef((props, ref) => { // ...constructionList.find((construction) => newAddedRoofs[index].construction.constTp === construction.constTp), ...roof.construction, roofIndex: roof.index, - setupCover: roof.construction.cvrChecked, - setupSnowCover: roof.construction.snowGdChecked, selectedIndex: roof.index, }, trestleDetail: roof.trestleDetail, diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index 1a71c671..1871e34a 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -409,7 +409,7 @@ export function useModuleBasicSetting(tabNum) { useEffect(() => { if (canvasSetting.roofSizeSet != '3') { - if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData.common.saleStoreNorthFlg === '1') { + if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData?.common?.saleStoreNorthFlg === '1') { setSaleStoreNorthFlg(true) } } diff --git a/src/hooks/module/useOrientation.js b/src/hooks/module/useOrientation.js index 649d8f79..cf15390e 100644 --- a/src/hooks/module/useOrientation.js +++ b/src/hooks/module/useOrientation.js @@ -22,8 +22,8 @@ export function useOrientation() { }) }, [])*/ - const nextStep = () => { - if (isNaN(compasDeg)) { + const nextStep = (compas = compasDeg) => { + if (isNaN(compas)) { setCompasDeg(0) } const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF) @@ -36,7 +36,7 @@ export function useOrientation() { roofs.forEach((roof) => { roof.set({ - moduleCompass: isNaN(compasDeg) ? 0 : compasDeg, + moduleCompass: isNaN(compas) ? 0 : compas, }) drawDirectionArrow(roof) })