From 2b8de3d0d00de09d58cb024949cb2261b5ba1da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=B0=BD=EC=88=98?= Date: Fri, 7 Nov 2025 15:46:04 +0900 Subject: [PATCH 01/28] =?UTF-8?q?style:=20=EB=AA=A8=EB=8B=AC=20=EC=A0=91?= =?UTF-8?q?=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/draggable/WithDraggable.jsx | 3 +++ src/styles/_modal.scss | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index 7ebdf067..e962eb16 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -42,11 +42,14 @@ function WithDraggableHeader({ title, onClose, children }) { return (

{title}

+
+ {onClose && ( )} +
) } diff --git a/src/styles/_modal.scss b/src/styles/_modal.scss index 4465f09a..b85f0268 100644 --- a/src/styles/_modal.scss +++ b/src/styles/_modal.scss @@ -133,8 +133,23 @@ $alert-color: #101010; color: $pop-color; font-weight: 700; } - .modal-close{ + .modal-btn-wrap{ margin-left: auto; + display: flex; + align-items: center; + gap: 15px; + } + .modal-fold{ + display: block; + width: 15px; + height: 15px; + background: url(../../public/static/images/canvas/penal_arr_white.svg)no-repeat center; + background-size: contain; + &.act{ + transform: rotate(180deg); + } + } + .modal-close{ color: transparent; font-size: 0; width: 10px; From 9af16ac047eea1b84c868d0fd50f1414a09d6267 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 11 Nov 2025 17:20:44 +0900 Subject: [PATCH 02/28] =?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(), From f63202877f3afb5132de3c9d0a40126abcfa6afa Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 18 Nov 2025 13:11:59 +0900 Subject: [PATCH 03/28] =?UTF-8?q?[1314][HANASYS=20DESIGN]Simulation?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=EC=9D=98=20=EB=B3=80=EA=B2=BD=EC=97=90=20?= =?UTF-8?q?=EB=8C=80=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' } }) } From 43f70f9f79da59656f2f10b56503ffba5dfa9293 Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 24 Nov 2025 14:03:10 +0900 Subject: [PATCH 04/28] =?UTF-8?q?=EC=86=8C=EC=88=98=EC=A0=90=EC=9D=B4?= =?UTF-8?q?=ED=95=98=202=EC=9E=90=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/input/CalcInput.jsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/common/input/CalcInput.jsx b/src/components/common/input/CalcInput.jsx index 32323560..17af010e 100644 --- a/src/components/common/input/CalcInput.jsx +++ b/src/components/common/input/CalcInput.jsx @@ -48,14 +48,23 @@ export const CalculatorInput = forwardRef( const calculator = calculatorRef.current let newDisplayValue = '' + // 소수점 이하 2자리 제한 로직 추가 + const shouldPreventInput = (value) => { + const decimalParts = (value || '').split('.') + return decimalParts.length > 1 && decimalParts[1].length >= 2 + } + if (hasOperation) { // 연산자 이후 숫자 입력 시 if (calculator.currentOperand === '0' || calculator.shouldResetDisplay) { calculator.currentOperand = num.toString() calculator.shouldResetDisplay = false - } else { + }else if (!shouldPreventInput(calculator.currentOperand)) { //소수점 이하2자리 calculator.currentOperand = (calculator.currentOperand || '') + num } + // else { + // calculator.currentOperand = (calculator.currentOperand || '') + num + // } newDisplayValue = calculator.previousOperand + calculator.operation + calculator.currentOperand setDisplayValue(newDisplayValue) } else { @@ -68,7 +77,7 @@ export const CalculatorInput = forwardRef( if (!hasOperation) { onChange(calculator.currentOperand) } - } else { + } else if (!shouldPreventInput(calculator.currentOperand)) { //소수점 이하2자리 calculator.currentOperand = (calculator.currentOperand || '') + num newDisplayValue = calculator.currentOperand setDisplayValue(newDisplayValue) @@ -76,6 +85,14 @@ export const CalculatorInput = forwardRef( onChange(newDisplayValue) } } + // else { + // calculator.currentOperand = (calculator.currentOperand || '') + num + // newDisplayValue = calculator.currentOperand + // setDisplayValue(newDisplayValue) + // if (!hasOperation) { + // onChange(newDisplayValue) + // } + // } } // 커서를 텍스트 끝으로 이동하고 스크롤 처리 From 3071c0ddc5512dc2e1e72e667f2ae0e371b1680b Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 24 Nov 2025 14:06:01 +0900 Subject: [PATCH 05/28] =?UTF-8?q?[1308]=20=EC=B4=8C=EC=97=90=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EC=9E=85=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/roofShape/type/Direction.jsx | 81 +++++++++++++++---- .../modal/roofShape/type/Pattern.jsx | 46 ++++++++++- .../floor-plan/modal/roofShape/type/Ridge.jsx | 31 ++++++- .../modal/roofShape/type/option/Eaves.jsx | 32 +++++++- .../modal/roofShape/type/option/Gable.jsx | 16 +++- .../roofShape/type/option/HipAndGable.jsx | 27 +++++-- .../roofShape/type/option/Jerkinhead.jsx | 52 ++++++++++-- .../modal/roofShape/type/option/Shed.jsx | 6 +- .../modal/roofShape/type/option/Wall.jsx | 28 +++++-- 9 files changed, 275 insertions(+), 44 deletions(-) diff --git a/src/components/floor-plan/modal/roofShape/type/Direction.jsx b/src/components/floor-plan/modal/roofShape/type/Direction.jsx index 5ea8e635..7c3cf809 100644 --- a/src/components/floor-plan/modal/roofShape/type/Direction.jsx +++ b/src/components/floor-plan/modal/roofShape/type/Direction.jsx @@ -1,5 +1,6 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, shedWidth, setShedWidth, pitchText }) { const { getMessage } = useMessage() @@ -10,12 +11,24 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))}*/} + {/*/>*/} + setPitch(normalizeDecimalLimit(e.target.value, 2))} - /> + onChange={(value) => setPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText} @@ -24,12 +37,24 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))}*/} + {/*/>*/} + setEavesOffset(normalizeDigits(e.target.value))} - /> + onChange={(value) => setEavesOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -38,12 +63,24 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset {getMessage('gable.offset')}
- setGableOffset(normalizeDigits(e.target.value))}*/} + {/*/>*/} + setGableOffset(normalizeDigits(e.target.value))} - /> + onChange={(value) => setGableOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -52,12 +89,24 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset {getMessage('windage.width')}
- setShedWidth(normalizeDigits(e.target.value))}*/} + {/*/>*/} + setShedWidth(normalizeDigits(e.target.value))} - /> + onChange={(value) => setShedWidth(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm diff --git a/src/components/floor-plan/modal/roofShape/type/Pattern.jsx b/src/components/floor-plan/modal/roofShape/type/Pattern.jsx index 269cac58..46631b5c 100644 --- a/src/components/floor-plan/modal/roofShape/type/Pattern.jsx +++ b/src/components/floor-plan/modal/roofShape/type/Pattern.jsx @@ -1,5 +1,6 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Pattern(props) { const { getMessage } = useMessage() @@ -11,7 +12,20 @@ export default function Pattern(props) { {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))} /> + {/* setPitch(normalizeDecimalLimit(e.target.value, 2))} />*/} + setPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText} @@ -20,7 +34,20 @@ export default function Pattern(props) { {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))} /> + {/* setEavesOffset(normalizeDigits(e.target.value))} />*/} + setEavesOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -29,7 +56,20 @@ export default function Pattern(props) { {getMessage('gable.offset')}
- setGableOffset(normalizeDigits(e.target.value))} /> + {/* setGableOffset(normalizeDigits(e.target.value))} />*/} + setGableOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm diff --git a/src/components/floor-plan/modal/roofShape/type/Ridge.jsx b/src/components/floor-plan/modal/roofShape/type/Ridge.jsx index fb0f016f..03f22936 100644 --- a/src/components/floor-plan/modal/roofShape/type/Ridge.jsx +++ b/src/components/floor-plan/modal/roofShape/type/Ridge.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import { useEffect } from 'react' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Ridge(props) { const { getMessage } = useMessage() @@ -13,7 +14,20 @@ export default function Ridge(props) { {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))} /> + {/* setPitch(normalizeDecimalLimit(e.target.value, 2))} />*/} + setPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText} @@ -22,7 +36,20 @@ export default function Ridge(props) { {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))} /> + {/* setEavesOffset(normalizeDigits(e.target.value))} />*/} + setEavesOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm diff --git a/src/components/floor-plan/modal/roofShape/type/option/Eaves.jsx b/src/components/floor-plan/modal/roofShape/type/option/Eaves.jsx index 8e231c7e..9477adae 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Eaves.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Eaves.jsx @@ -1,5 +1,6 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pitchText }) { const { getMessage } = useMessage() @@ -10,7 +11,21 @@ export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pi {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))} /> + {/* setPitch(normalizeDecimalLimit(e.target.value, 2))} />*/} + setPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + > +
{pitchText} @@ -19,7 +34,20 @@ export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pi {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))} /> + {/* setEavesOffset(normalizeDigits(e.target.value))} />*/} + setEavesOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm diff --git a/src/components/floor-plan/modal/roofShape/type/option/Gable.jsx b/src/components/floor-plan/modal/roofShape/type/option/Gable.jsx index 173c12f4..1b6c1c7f 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Gable.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Gable.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import { useEffect } from 'react' import { normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Gable({ gableOffset, setGableOffset }) { const { getMessage } = useMessage() @@ -10,7 +11,20 @@ export default function Gable({ gableOffset, setGableOffset }) {
{getMessage('gable.offset')}
- setGableOffset(normalizeDigits(e.target.value))} /> + {/* setGableOffset(normalizeDigits(e.target.value))} />*/} + setGableOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm
diff --git a/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx b/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx index 787dd0e8..674525a8 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx @@ -1,5 +1,6 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffset, hipAndGableWidth, setHipAndGableWidth, pitchText }) { const { getMessage } = useMessage() @@ -10,7 +11,8 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))} /> + setPitch(normalizeDecimalLimit(e.target.value, 2))} />
{pitchText} @@ -19,7 +21,8 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))} /> + setEavesOffset(normalizeDigits(e.target.value))} />
mm @@ -28,12 +31,24 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs {getMessage('hipandgable.width')}
- setHipAndGableWidth(normalizeDigits(e.target.value))}*/} + {/*/>*/} + setHipAndGableWidth(normalizeDigits(e.target.value))} - /> + onChange={(value) => setHipAndGableWidth(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm diff --git a/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx b/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx index 22f0607e..c4f8736f 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx @@ -1,5 +1,6 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Jerkinhead({ gableOffset, @@ -18,7 +19,20 @@ export default function Jerkinhead({ {getMessage('gable.offset')}
- setGableOffset(normalizeDigits(e.target.value))} /> + setGableOffset(normalizeDigits(e.target.value))} /> + setGableOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -27,7 +41,21 @@ export default function Jerkinhead({ {getMessage('jerkinhead.width')}
- setJerkinHeadWidth(normalizeDigits(e.target.value))} /> + {/* setJerkinHeadWidth(normalizeDigits(e.target.value))} />*/} + + setJerkinHeadWidth(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -36,12 +64,24 @@ export default function Jerkinhead({ {getMessage('jerkinhead.slope')}
- setJerkinHeadPitch(normalizeDecimalLimit(e.target.value, 2))}*/} + {/*/>*/} + setJerkinHeadPitch(normalizeDecimalLimit(e.target.value, 2))} - /> + onChange={(value) => jerkinHeadPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText} diff --git a/src/components/floor-plan/modal/roofShape/type/option/Shed.jsx b/src/components/floor-plan/modal/roofShape/type/option/Shed.jsx index daacea56..7326204e 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Shed.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Shed.jsx @@ -8,14 +8,16 @@ export default function Shed({ shedWidth, setShedWidth, shedPitch, setShedPitch,
{getMessage('slope')}
- setShedPitch(normalizeDecimalLimit(e.target.value, 2))} /> + setShedPitch(normalizeDecimalLimit(e.target.value, 2))} />
{pitchText}
{getMessage('shed.width')}
- setShedWidth(normalizeDigits(e.target.value))} /> + setShedWidth(normalizeDigits(e.target.value))} />
mm
diff --git a/src/components/floor-plan/modal/roofShape/type/option/Wall.jsx b/src/components/floor-plan/modal/roofShape/type/option/Wall.jsx index dfdff20d..bee6e9bb 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Wall.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Wall.jsx @@ -1,6 +1,7 @@ import { useState } from 'react' import { useMessage } from '@/hooks/useMessage' import { normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasSleeve }) { const { getMessage } = useMessage() @@ -10,7 +11,8 @@ export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasS
- setHasSleeve(e.target.value)} /> + setHasSleeve(e.target.value)} />
@@ -18,20 +20,34 @@ export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasS
- setHasSleeve(e.target.value)} /> + setHasSleeve(e.target.value)} />
- setSleeveOffset(normalizeDigits(e.target.value))}*/} + {/* readOnly={hasSleeve === '0'}*/} + {/*/>*/} + setSleeveOffset(normalizeDigits(e.target.value))} + onChange={(value) => setSleeveOffset(value)} readOnly={hasSleeve === '0'} - /> + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm
From 0a97166b06d1b46f703a87a2be6e1e35c188ecc5 Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 24 Nov 2025 14:23:45 +0900 Subject: [PATCH 06/28] =?UTF-8?q?[1308]=20=EC=B4=8C=EC=97=90=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EC=9E=85=EB=A0=A52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roofShape/type/option/HipAndGable.jsx | 33 ++++++++++++++++--- .../roofShape/type/option/Jerkinhead.jsx | 4 +-- .../modal/roofShape/type/option/Shed.jsx | 33 ++++++++++++++++--- 3 files changed, 60 insertions(+), 10 deletions(-) diff --git a/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx b/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx index 674525a8..cb38560f 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/HipAndGable.jsx @@ -11,8 +11,20 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs {getMessage('slope')}
- setPitch(normalizeDecimalLimit(e.target.value, 2))} /> + {/* setPitch(normalizeDecimalLimit(e.target.value, 2))} />*/} + setPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText}
@@ -21,8 +33,21 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs {getMessage('eaves.offset')}
- setEavesOffset(normalizeDigits(e.target.value))} /> + {/* setEavesOffset(normalizeDigits(e.target.value))} />*/} + setEavesOffset(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + > +
mm
diff --git a/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx b/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx index c4f8736f..30c1a9bd 100644 --- a/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx +++ b/src/components/floor-plan/modal/roofShape/type/option/Jerkinhead.jsx @@ -19,8 +19,8 @@ export default function Jerkinhead({ {getMessage('gable.offset')}
- setGableOffset(normalizeDigits(e.target.value))} /> + {/* setGableOffset(normalizeDigits(e.target.value))} />*/} {getMessage('slope')}
- setShedPitch(normalizeDecimalLimit(e.target.value, 2))} /> + {/* setShedPitch(normalizeDecimalLimit(e.target.value, 2))} />*/} + setShedPitch(value)} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText}
{getMessage('shed.width')}
- setShedWidth(normalizeDigits(e.target.value))} /> + {/* setShedWidth(normalizeDigits(e.target.value))} />*/} + setShedWidth(value)} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm
From d9b68f301233f81197ba6031cda0f35d36956367 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 25 Nov 2025 09:49:04 +0900 Subject: [PATCH 07/28] =?UTF-8?q?[1308]=20=EC=B4=8C=EC=97=90=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EC=9E=85=EB=A0=A5=20-=20=EC=B2=98?= =?UTF-8?q?=EB=A7=88,=EC=BC=80=EB=9D=BC=EB=B0=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/eavesGable/type/Eaves.jsx | 96 ++++++++++++++----- .../modal/eavesGable/type/Gable.jsx | 54 +++++++++-- .../floor-plan/modal/eavesGable/type/Shed.jsx | 15 ++- .../modal/eavesGable/type/WallMerge.jsx | 16 +++- 4 files changed, 148 insertions(+), 33 deletions(-) diff --git a/src/components/floor-plan/modal/eavesGable/type/Eaves.jsx b/src/components/floor-plan/modal/eavesGable/type/Eaves.jsx index f9548dad..fb4db8cd 100644 --- a/src/components/floor-plan/modal/eavesGable/type/Eaves.jsx +++ b/src/components/floor-plan/modal/eavesGable/type/Eaves.jsx @@ -4,6 +4,7 @@ import { useState } from 'react' import { useRecoilValue } from 'recoil' import { ANGLE_TYPE, currentAngleTypeSelector } from '@/store/canvasAtom' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Eaves({ pitchRef, offsetRef, widthRef, radioTypeRef, pitchText }) { const { getMessage } = useMessage() @@ -21,17 +22,32 @@ export default function Eaves({ pitchRef, offsetRef, widthRef, radioTypeRef, pit {getMessage('slope')}
- {*/} + {/* const v = normalizeDecimalLimit(e.target.value, 2)*/} + {/* e.target.value = v*/} + {/* if (pitchRef?.current) pitchRef.current.value = v*/} + {/* }}*/} + {/*/>*/} + { - const v = normalizeDecimalLimit(e.target.value, 2) - e.target.value = v - if (pitchRef?.current) pitchRef.current.value = v + value={currentAngleType === ANGLE_TYPE.SLOPE ? 4 : 21.8} + onChange={(value) => { + if (pitchRef?.current) pitchRef.current.value = value }} - /> + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText}
@@ -40,17 +56,32 @@ export default function Eaves({ pitchRef, offsetRef, widthRef, radioTypeRef, pit {getMessage('offset')}
- {*/} + {/* const v = normalizeDigits(e.target.value)*/} + {/* e.target.value = v*/} + {/* if (offsetRef?.current) offsetRef.current.value = v*/} + {/* }}*/} + {/*/>*/} + { - const v = normalizeDigits(e.target.value) - e.target.value = v - if (offsetRef?.current) offsetRef.current.value = v + value={500} + onChange={(value) => { + if (offsetRef?.current) offsetRef.current.value = value }} - /> + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm @@ -91,18 +122,33 @@ export default function Eaves({ pitchRef, offsetRef, widthRef, radioTypeRef, pit
- {*/} + {/* const v = normalizeDigits(e.target.value)*/} + {/* e.target.value = v*/} + {/* if (widthRef?.current) widthRef.current.value = v*/} + {/* }}*/} + {/*/>*/} + { - const v = normalizeDigits(e.target.value) - e.target.value = v - if (widthRef?.current) widthRef.current.value = v + value={500} + onChange={(value) => { + if (widthRef?.current) widthRef.current.value = value }} - /> + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
mm
diff --git a/src/components/floor-plan/modal/eavesGable/type/Gable.jsx b/src/components/floor-plan/modal/eavesGable/type/Gable.jsx index 7dd21539..c5496a1e 100644 --- a/src/components/floor-plan/modal/eavesGable/type/Gable.jsx +++ b/src/components/floor-plan/modal/eavesGable/type/Gable.jsx @@ -3,6 +3,7 @@ import Image from 'next/image' import { useState } from 'react' import { useRecoilValue } from 'recoil' import { ANGLE_TYPE, currentAngleTypeSelector } from '@/store/canvasAtom' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pitchText }) { const { getMessage } = useMessage() @@ -21,7 +22,19 @@ export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pit {getMessage('offset')}
- + {/**/} +
mm
@@ -65,13 +78,29 @@ export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pit {getMessage('slope')}
- */} + + onChange={(value) => { + if (pitchRef?.current) pitchRef.current.value = value + }} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} + >
{pitchText} @@ -91,7 +120,20 @@ export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pit {getMessage('offset')}
- + {/**/} +
mm diff --git a/src/components/floor-plan/modal/eavesGable/type/Shed.jsx b/src/components/floor-plan/modal/eavesGable/type/Shed.jsx index 436316a3..8ce6038a 100644 --- a/src/components/floor-plan/modal/eavesGable/type/Shed.jsx +++ b/src/components/floor-plan/modal/eavesGable/type/Shed.jsx @@ -1,4 +1,5 @@ import { useMessage } from '@/hooks/useMessage' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Shed({ offsetRef }) { const { getMessage } = useMessage() @@ -10,7 +11,19 @@ export default function Shed({ offsetRef }) { {getMessage('offset')}
- + {/**/} +
mm diff --git a/src/components/floor-plan/modal/eavesGable/type/WallMerge.jsx b/src/components/floor-plan/modal/eavesGable/type/WallMerge.jsx index 0ed01ede..e398a2f1 100644 --- a/src/components/floor-plan/modal/eavesGable/type/WallMerge.jsx +++ b/src/components/floor-plan/modal/eavesGable/type/WallMerge.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import Image from 'next/image' import { useState } from 'react' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function WallMerge({ offsetRef, radioTypeRef }) { const { getMessage } = useMessage() @@ -51,7 +52,20 @@ export default function WallMerge({ offsetRef, radioTypeRef }) { {getMessage('offset')}
- + {/**/} +
mm From f5b68894eab4420bb6f93982a2414c42d2d24a8b Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 25 Nov 2025 13:32:36 +0900 Subject: [PATCH 08/28] sessionState?.storeId --- src/components/community/modal/QnaRegModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/community/modal/QnaRegModal.jsx b/src/components/community/modal/QnaRegModal.jsx index 8f9437f9..00c444c6 100644 --- a/src/components/community/modal/QnaRegModal.jsx +++ b/src/components/community/modal/QnaRegModal.jsx @@ -89,7 +89,7 @@ let fileCheck = false; siteTpCd: "QC", schNoticeClsCd: "QNA", regId: sessionState?.userId || '', - storeId: sessionState?.userId || '', + storeId: sessionState?.storeId || '', qstMail: sessionState?.email || '', qnaClsLrgCd: '', qnaClsMidCd: '', From 7ddbc40cd493cb737fa1e7a85f0a2409f3446c4e Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 25 Nov 2025 13:41:35 +0900 Subject: [PATCH 09/28] =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EC=A0=91=ED=9E=98=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/draggable/WithDraggable.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index e962eb16..fa87910a 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -24,7 +24,7 @@ export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, handleOnDrag(e, data)} - handle= ''//{handle === '' ? '.modal-handle' : handle} //전체 handle + handle="" //{handle === '' ? '.modal-handle' : handle} //전체 handle cancel="input, button, select, textarea, [contenteditable], .sort-select" >
@@ -38,17 +38,17 @@ export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, ) } -function WithDraggableHeader({ title, onClose, children }) { +function WithDraggableHeader({ title, onClose, children, isFold, onFold = null }) { return (

{title}

-
- - {onClose && ( - - )} +
+ {onFold && } + {onClose && ( + + )}
) From aeb457e5ec5a8659d3514ea44d10ffd35aa26565 Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 26 Nov 2025 09:18:01 +0900 Subject: [PATCH 10/28] =?UTF-8?q?[1308]=20=EC=B4=8C=EC=97=90=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EC=9E=85=EB=A0=A5=20-=20=EC=B2=98?= =?UTF-8?q?=EB=A7=88,=EC=BC=80=EB=9D=BC=EB=B0=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/modal/eavesGable/type/Gable.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/floor-plan/modal/eavesGable/type/Gable.jsx b/src/components/floor-plan/modal/eavesGable/type/Gable.jsx index c5496a1e..b8eab8a7 100644 --- a/src/components/floor-plan/modal/eavesGable/type/Gable.jsx +++ b/src/components/floor-plan/modal/eavesGable/type/Gable.jsx @@ -98,7 +98,7 @@ export default function Gable({ pitchRef, offsetRef, widthRef, radioTypeRef, pit }} options={{ allowNegative: false, - allowDecimal: false //(index !== 0), + allowDecimal: true //(index !== 0), }} >
From 34871397eee7ddd75126217af66e168f28b5bbe1 Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 26 Nov 2025 09:29:17 +0900 Subject: [PATCH 11/28] =?UTF-8?q?[1308]=20=EC=B4=8C=EC=97=90=20=EC=86=8C?= =?UTF-8?q?=EC=88=98=EC=A0=90=20=EC=9E=85=EB=A0=A5=20-=20{pitchText}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/modal/Slope.jsx | 15 +++++++++- .../ContextRoofAllocationSetting.jsx | 30 ++++++++++++++----- .../roofAllocation/RoofAllocationSetting.jsx | 30 ++++++++++++++----- .../modal/roofShape/passivity/Eaves.jsx | 21 ++++++++++--- 4 files changed, 77 insertions(+), 19 deletions(-) diff --git a/src/components/floor-plan/modal/Slope.jsx b/src/components/floor-plan/modal/Slope.jsx index df4a25d7..849920bf 100644 --- a/src/components/floor-plan/modal/Slope.jsx +++ b/src/components/floor-plan/modal/Slope.jsx @@ -4,6 +4,7 @@ import { globalPitchState, pitchSelector, pitchTextSelector } from '@/store/canv import { useRecoilState } from 'recoil' import { useRef } from 'react' import { usePopup } from '@/hooks/usePopup' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Slope({ id, pos = { x: 50, y: 230 } }) { const { getMessage } = useMessage() @@ -22,7 +23,19 @@ export default function Slope({ id, pos = { x: 50, y: 230 } }) { {getMessage('slope')}
- + {/**/} +
{pitchText}
diff --git a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx index 78597844..82abfa3a 100644 --- a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx @@ -13,6 +13,7 @@ import { useCommonCode } from '@/hooks/common/useCommonCode' import { globalLocaleStore } from '@/store/localeAtom' import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function ContextRoofAllocationSetting(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) @@ -204,15 +205,30 @@ export default function ContextRoofAllocationSetting(props) {
{getMessage('modal.object.setting.offset.slope')}
- {*/} + {/* e.target.value = normalizeDecimalLimit(e.target.value, 2)*/} + {/* handleChangePitch(e, index)*/} + {/* }}*/} + {/* value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}*/} + {/*/>*/} + { - e.target.value = normalizeDecimalLimit(e.target.value, 2) - handleChangePitch(e, index) - }} + ref={pitchRef} value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')} - /> + onChange={(value) => { + handleChangePitch(value, index) + }} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText}
diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx index 0e0e09ee..2e8d415b 100644 --- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx @@ -14,6 +14,7 @@ import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting' import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom' import { getDegreeByChon } from '@/util/canvas-util' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function RoofAllocationSetting(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) @@ -205,15 +206,30 @@ export default function RoofAllocationSetting(props) {
{getMessage('modal.object.setting.offset.slope')}
- {*/} + {/* e.target.value = normalizeDecimalLimit(e.target.value, 2)*/} + {/* handleChangePitch(e, index)*/} + {/* }}*/} + {/* value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')}*/} + {/*/>*/} + { - e.target.value = normalizeDecimalLimit(e.target.value, 2) - handleChangePitch(e, index) - }} + ref={pitchRef} value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')} - /> + onChange={(value) => { + handleChangePitch(value, index) + }} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText}
diff --git a/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx b/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx index c49cb3fa..fac8701e 100644 --- a/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx +++ b/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx @@ -3,6 +3,7 @@ import { useRecoilValue } from 'recoil' import { ANGLE_TYPE, currentAngleTypeSelector } from '@/store/canvasAtom' import { selectedRoofMaterialSelector } from '@/store/settingAtom' import { useEffect } from 'react' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Eaves({ offsetRef, pitchRef, pitchText }) { const { getMessage } = useMessage() @@ -16,12 +17,24 @@ export default function Eaves({ offsetRef, pitchRef, pitchText }) { {getMessage('slope')}
- */} + + value={currentAngleType === ANGLE_TYPE.SLOPE ? selectedRoofMaterial.pitch : selectedRoofMaterial.angle} + options={{ + allowNegative: false, + allowDecimal: true //(index !== 0), + }} + >
{pitchText} From 189dd82c5071b7fb1d0db86514fbd9666a301249 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 26 Nov 2025 09:47:06 +0900 Subject: [PATCH 12/28] =?UTF-8?q?=EB=AA=A8=EB=93=88,=20=ED=9A=8C=EB=A1=9C?= =?UTF-8?q?=EA=B5=AC=EC=84=B1=20=ED=8C=9D=EC=97=85=20=EC=A4=84=EC=9D=B4?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/basic/BasicSetting.jsx | 60 +++++++++++-------- .../circuitTrestle/CircuitTrestleSetting.jsx | 52 +++++++++------- 2 files changed, 66 insertions(+), 46 deletions(-) diff --git a/src/components/floor-plan/modal/basic/BasicSetting.jsx b/src/components/floor-plan/modal/basic/BasicSetting.jsx index a70b9a22..ac2b3ca4 100644 --- a/src/components/floor-plan/modal/basic/BasicSetting.jsx +++ b/src/components/floor-plan/modal/basic/BasicSetting.jsx @@ -1,4 +1,4 @@ -import { POLYGON_TYPE, MODULE_SETUP_TYPE } from '@/common/common' +import { MODULE_SETUP_TYPE, POLYGON_TYPE } from '@/common/common' import WithDraggable from '@/components/common/draggable/WithDraggable' import { Orientation } from '@/components/floor-plan/modal/basic/step/Orientation' import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement' @@ -74,6 +74,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) { const { trigger: trestleTrigger } = useCanvasPopupStatusController(2) const { trigger: placementTrigger } = useCanvasPopupStatusController(3) const [roofsStore, setRoofsStore] = useRecoilState(roofsState) + const [isFold, setIsFold] = useState(false) // const { initEvent } = useContext(EventContext) const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup, manualModuleLayoutSetup, restoreModuleInstArea } = @@ -282,35 +283,42 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) { return ( - handleClosePopup(id)} /> + handleClosePopup(id)} + onFold={() => setIsFold(!isFold)} + /> -
-
{getMessage('modal.module.basic.setting.orientation.setting')}
- - {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && ( - <> -
{getMessage('modal.module.basic.setting.module.setting')}
- -
{getMessage('modal.module.basic.setting.module.placement')}
- +
+
+
{getMessage('modal.module.basic.setting.orientation.setting')}
+ + {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && ( + <> +
{getMessage('modal.module.basic.setting.module.setting')}
+ +
{getMessage('modal.module.basic.setting.module.placement')}
+ + )} + {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && ( + <> +
{getMessage('modal.module.basic.setting.module.placement')}
+ + )} +
+ {tabNum === 1 && } + {/*배치면 초기설정 - 입력방법: 복시도 입력 || 실측값 입력*/} + {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && tabNum === 2 && } + {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && tabNum === 3 && ( + )} - {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && ( - <> -
{getMessage('modal.module.basic.setting.module.placement')}
- + {/*배치면 초기설정 - 입력방법: 육지붕*/} + {/* {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && tabNum === 3 && } */} + {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && tabNum === 2 && ( + )}
- {tabNum === 1 && } - {/*배치면 초기설정 - 입력방법: 복시도 입력 || 실측값 입력*/} - {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && tabNum === 2 && } - {basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && tabNum === 3 && ( - - )} - {/*배치면 초기설정 - 입력방법: 육지붕*/} - {/* {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && tabNum === 3 && } */} - {basicSetting.roofSizeSet && basicSetting.roofSizeSet == '3' && tabNum === 2 && ( - - )}
{/* {tabNum === 1 && } */} diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index 68893c23..002a2932 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -20,8 +20,8 @@ import { useEstimate } from '@/hooks/useEstimate' import { useCircuitTrestle } from '@/hooks/useCirCuitTrestle' import { useImgLoader } from '@/hooks/floorPlan/useImgLoader' import { QcastContext } from '@/app/QcastProvider' -import { fabric } from 'fabric' import { fontSelector } from '@/store/fontAtom' +import { fabric } from 'fabric' const ALLOCATION_TYPE = { AUTO: 'auto', @@ -59,6 +59,9 @@ export default function CircuitTrestleSetting({ id }) { const passivityCircuitAllocationRef = useRef() const { setIsGlobalLoading } = useContext(QcastContext) + const originCanvasViewPortTransform = useRef([]) + const [isFold, setIsFold] = useState(false) + const { makers, setMakers, @@ -83,6 +86,7 @@ export default function CircuitTrestleSetting({ id }) { } = useCircuitTrestle() // const { trigger: moduleSelectedDataTrigger } = useCanvasPopupStatusController(2) useEffect(() => { + originCanvasViewPortTransform.current = [...canvas.viewportTransform] if (!managementState) { } // setCircuitData({ @@ -171,15 +175,12 @@ export default function CircuitTrestleSetting({ id }) { }) } - canvas.renderAll() - - // roof polygon들의 중간점 계산 - const roofPolygons = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF) let x, y x = canvas.width / 2 y = canvas.height / 2 - + canvas.zoomToPoint(new fabric.Point(x, y), 0.4) + changeFontSize('lengthText', '28') changeFontSize('circuitNumber', '28') changeFontSize('flowText', '28') @@ -188,9 +189,12 @@ export default function CircuitTrestleSetting({ id }) { // 캡쳐 후 처리 const afterCapture = (type) => { - setCanvasZoom(100) - canvas.set({ zoom: 1 }) - canvas.viewportTransform = [1, 0, 0, 1, 0, 0] + if (originCanvasViewPortTransform.current[0] !== 1) { + setCanvasZoom(Number((originCanvasViewPortTransform.current[0] * 100).toFixed(0))) + } + canvas.viewportTransform = [...originCanvasViewPortTransform.current] + canvas.renderAll() + changeFontSize('lengthText', lengthText.fontSize.value) changeFontSize('circuitNumber', circuitNumberText.fontSize.value) changeFontSize('flowText', flowText.fontSize.value) @@ -788,20 +792,28 @@ export default function CircuitTrestleSetting({ id }) { return ( - handleClose()} /> + handleClose()} + isFold={isFold} + onFold={() => setIsFold(!isFold)} + /> -
-
{getMessage('modal.circuit.trestle.setting.power.conditional.select')}
- -
- {getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')}) +
+
+
{getMessage('modal.circuit.trestle.setting.power.conditional.select')}
+ +
+ {getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')}) +
+ {tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && } + {tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && ( + + )} + {tabNum === 2 && }
- {tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && } - {tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && ( - - )} - {tabNum === 2 && } + {tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && (
diff --git a/src/components/floor-plan/modal/lineTypes/DoublePitch.jsx b/src/components/floor-plan/modal/lineTypes/DoublePitch.jsx index 92e63e07..12ed66be 100644 --- a/src/components/floor-plan/modal/lineTypes/DoublePitch.jsx +++ b/src/components/floor-plan/modal/lineTypes/DoublePitch.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' import { getDegreeByChon } from '@/util/canvas-util' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function DoublePitch({ props }) { const { getMessage } = useMessage() @@ -50,14 +51,29 @@ export default function DoublePitch({ props }) {
{getMessage('modal.cover.outline.angle')}
- (angle1Ref.current.value = '')}*/} + {/* onChange={(e) => setAngle1(normalizeDecimalLimit(e.target.value, 2))}*/} + {/* placeholder="45"*/} + {/*/>*/} + (angle1Ref.current.value = '')} - onChange={(e) => setAngle1(normalizeDecimalLimit(e.target.value, 2))} + onChange={(value) => setAngle1(value)} placeholder="45" + onFocus={() => (angle1Ref.current.value = '')} + options={{ + allowNegative: false, + allowDecimal: true + }} />
@@ -67,14 +83,29 @@ export default function DoublePitch({ props }) {
{getMessage('modal.cover.outline.length')}
- (length1Ref.current.value = '')}*/} + {/* onChange={(e) => setLength1(normalizeDigits(e.target.value))}*/} + {/* placeholder="3000"*/} + {/*/>*/} + (length1Ref.current.value = '')} - onChange={(e) => setLength1(normalizeDigits(e.target.value))} + onChange={(value) => setLength1(value)} placeholder="3000" + onFocus={() => (length1Ref.current.value = '')} + options={{ + allowNegative: false, + allowDecimal: false + }} />