From 5bb49097ef8db40989b2f31b97a5352f67013ec9 Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 26 Nov 2025 18:10:48 +0900 Subject: [PATCH 1/3] ref={pitchRef} --- .../modal/roofAllocation/ContextRoofAllocationSetting.jsx | 1 - .../floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx index 82abfa3a..05b2759a 100644 --- a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx @@ -219,7 +219,6 @@ export default function ContextRoofAllocationSetting(props) { name="" label="" className="input-origin block" - ref={pitchRef} value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')} onChange={(value) => { handleChangePitch(value, index) diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx index 2e8d415b..79b524ef 100644 --- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx @@ -220,7 +220,6 @@ export default function RoofAllocationSetting(props) { name="" label="" className="input-origin block" - ref={pitchRef} value={currentAngleType === 'slope' ? (roof.pitch ?? '') : (roof.angle ?? '')} onChange={(value) => { handleChangePitch(value, index) From 924ec70402564ef407c7c9cc8c959dbbd6d6b502 Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 27 Nov 2025 10:28:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EC=8B=A4=EC=B8=A1=EA=B0=92=EC=9E=85?= =?UTF-8?q?=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/lineTypes/Angle.jsx | 47 ++++++-- .../floor-plan/modal/lineTypes/Diagonal.jsx | 62 +++++++++-- .../modal/lineTypes/DoublePitch.jsx | 102 ++++++++++++++---- .../floor-plan/modal/lineTypes/RightAngle.jsx | 49 +++++++-- .../floor-plan/modal/object/DormerOffset.jsx | 18 +++- .../floor-plan/modal/object/SizeSetting.jsx | 51 +++++++-- .../modal/object/type/OpenSpace.jsx | 43 ++++++-- .../modal/object/type/PentagonDormer.jsx | 81 +++++++++++++- .../floor-plan/modal/object/type/Shadow.jsx | 43 ++++++-- .../modal/object/type/TriangleDormer.jsx | 49 ++++++++- 10 files changed, 474 insertions(+), 71 deletions(-) diff --git a/src/components/floor-plan/modal/lineTypes/Angle.jsx b/src/components/floor-plan/modal/lineTypes/Angle.jsx index 880aac04..0faad2a4 100644 --- a/src/components/floor-plan/modal/lineTypes/Angle.jsx +++ b/src/components/floor-plan/modal/lineTypes/Angle.jsx @@ -1,6 +1,7 @@ import Image from 'next/image' import { useMessage } from '@/hooks/useMessage' import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Angle({ props }) { const { getMessage } = useMessage() @@ -14,14 +15,29 @@ export default function Angle({ 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 + }} />