From 6967b8cda05547308a8d60c3c290807fecebbba3 Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 26 Mar 2026 10:12:48 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=A3=81=E3=81=AE=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=81=A8=E3=82=AA=E3=83=95=E3=82=BB=E3=83=83=E3=83=88=20?= =?UTF-8?q?=ED=86=A0=EA=B8=80=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/wallLineOffset/WallLineOffsetSetting.jsx | 11 ++++++++++- .../floor-plan/modal/wallLineOffset/type/Offset.jsx | 3 ++- .../floor-plan/modal/wallLineOffset/type/WallLine.jsx | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/floor-plan/modal/wallLineOffset/WallLineOffsetSetting.jsx b/src/components/floor-plan/modal/wallLineOffset/WallLineOffsetSetting.jsx index 09c847e7..86ab5df6 100644 --- a/src/components/floor-plan/modal/wallLineOffset/WallLineOffsetSetting.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/WallLineOffsetSetting.jsx @@ -4,10 +4,14 @@ import WallLine from '@/components/floor-plan/modal/wallLineOffset/type/WallLine import Offset from '@/components/floor-plan/modal/wallLineOffset/type/Offset' import { useWallLineOffsetSetting } from '@/hooks/roofcover/useWallLineOffsetSetting' import { usePopup } from '@/hooks/usePopup' +import { useState } from 'react' +import Image from 'next/image' export default function WallLineOffsetSetting({ id, pos = { x: 50, y: 230 } }) { const { getMessage } = useMessage() const { closePopup } = usePopup() + const [useCalcPad, setUseCalcPad] = useState(false) + const disableKeypad = !useCalcPad const { type, setType, @@ -30,12 +34,14 @@ export default function WallLineOffsetSetting({ id, pos = { x: 50, y: 230 } }) { arrow2Ref, radioTypeRef, currentWallLineRef, + disableKeypad, } const offsetProps = { length1Ref, arrow1Ref, currentWallLineRef, + disableKeypad, } return ( @@ -54,7 +60,10 @@ export default function WallLineOffsetSetting({ id, pos = { x: 50, y: 230 } }) { {type === TYPES.WALL_LINE_EDIT && } {type === TYPES.OFFSET && } -
+
+ diff --git a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx index 79ae0898..8c4685ee 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react' import { useEvent } from '@/hooks/useEvent' import { CalculatorInput } from '@/components/common/input/CalcInput' -export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) { +export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef, disableKeypad }) { const { getMessage } = useMessage() const { addDocumentEventListener, initEvent } = useEvent() // const { addDocumentEventListener, initEvent } = useContext(EventContext) @@ -84,6 +84,7 @@ export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) { value={length1Ref.current?.value ?? 0} ref={length1Ref} onChange={() => {}} + disableKeypad={disableKeypad} options={{ allowNegative: false, allowDecimal: false diff --git a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx index d78a202f..610780e6 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx @@ -3,7 +3,7 @@ import { forwardRef, useEffect, useImperativeHandle, useState } from 'react' import { useEvent } from '@/hooks/useEvent' import { CalculatorInput } from '@/components/common/input/CalcInput' -export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref, arrow2Ref, radioTypeRef, currentWallLineRef }, ref) { +export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref, arrow2Ref, radioTypeRef, currentWallLineRef, disableKeypad }, ref) { const { getMessage } = useMessage() const { addDocumentEventListener, initEvent } = useEvent() // const { addDocumentEventListener, initEvent } = useContext(EventContext) @@ -57,6 +57,7 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref, ref={length1Ref} onChange={() => {}} readOnly={type !== 1} + disableKeypad={disableKeypad} options={{ allowNegative: false, allowDecimal: false @@ -105,6 +106,7 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref, ref={length2Ref} onChange={() => {}} readOnly={type !== 2} + disableKeypad={disableKeypad} options={{ allowNegative: false, allowDecimal: false