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 1/3] =?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 43f70f9f79da59656f2f10b56503ffba5dfa9293 Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 24 Nov 2025 14:03:10 +0900 Subject: [PATCH 2/3] =?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 3/3] =?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