From d9b68f301233f81197ba6031cda0f35d36956367 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 25 Nov 2025 09:49:04 +0900 Subject: [PATCH] =?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