- */}
+ setHeight(value)}
disabled={selectedType !== INPUT_TYPE.DIMENSION}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
/>
mm
diff --git a/src/components/floor-plan/modal/object/type/PentagonDormer.jsx b/src/components/floor-plan/modal/object/type/PentagonDormer.jsx
index 9d82485c..30bb3a49 100644
--- a/src/components/floor-plan/modal/object/type/PentagonDormer.jsx
+++ b/src/components/floor-plan/modal/object/type/PentagonDormer.jsx
@@ -1,6 +1,7 @@
import Image from 'next/image'
import { useMessage } from '@/hooks/useMessage'
import { forwardRef, useState } from 'react'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
const PentagonDormer = forwardRef((props, refs) => {
const { getMessage } = useMessage()
@@ -11,6 +12,11 @@ const PentagonDormer = forwardRef((props, refs) => {
setDirection(e.target.value)
refs.directionRef.current = e.target.value
}
+ const [pitch, setPitch] = useState(4) // pitch 상태 추가, 기본값 4로 설정
+ const [offsetWidth, setOffsetWidth] = useState(300) // offsetWidth 상태 추가, 기본값 300으로
+ const [offsetDepth, setOffsetDepth] = useState(400) // offsetDepth 상태 추가, 기본값 400으로
+ const [width, setWidth] = useState(2000) // width 상태 추가, 기본값 2000으로
+ const [height, setHeight] = useState(2000) // height 상태 추가, 기본값 2000으로
return (
<>
@@ -30,7 +36,20 @@ const PentagonDormer = forwardRef((props, refs) => {
@@ -41,7 +60,20 @@ const PentagonDormer = forwardRef((props, refs) => {
@@ -55,7 +87,20 @@ const PentagonDormer = forwardRef((props, refs) => {
@@ -66,7 +111,20 @@ const PentagonDormer = forwardRef((props, refs) => {
@@ -77,7 +135,20 @@ const PentagonDormer = forwardRef((props, refs) => {
diff --git a/src/components/floor-plan/modal/object/type/Shadow.jsx b/src/components/floor-plan/modal/object/type/Shadow.jsx
index 0945d78c..52595fa1 100644
--- a/src/components/floor-plan/modal/object/type/Shadow.jsx
+++ b/src/components/floor-plan/modal/object/type/Shadow.jsx
@@ -1,11 +1,14 @@
import { forwardRef, useState, useEffect } from 'react'
import { useMessage } from '@/hooks/useMessage'
import { INPUT_TYPE } from '@/common/common'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
const Shadow = forwardRef((props, refs) => {
const { getMessage } = useMessage()
const [selectedType, setSelectedType] = useState(INPUT_TYPE.FREE)
+ const [width, setWidth] = useState(0)
+ const [height, setHeight] = useState(0)
useEffect(() => {
if (selectedType === INPUT_TYPE.FREE) {
@@ -51,12 +54,26 @@ const Shadow = forwardRef((props, refs) => {
- */}
+ setWidth(value)}
disabled={selectedType !== INPUT_TYPE.DIMENSION}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
/>
mm
@@ -68,12 +85,26 @@ const Shadow = forwardRef((props, refs) => {
- */}
+ setHeight(value)}
disabled={selectedType !== INPUT_TYPE.DIMENSION}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
/>
mm
diff --git a/src/components/floor-plan/modal/object/type/TriangleDormer.jsx b/src/components/floor-plan/modal/object/type/TriangleDormer.jsx
index 65fed20b..08e31538 100644
--- a/src/components/floor-plan/modal/object/type/TriangleDormer.jsx
+++ b/src/components/floor-plan/modal/object/type/TriangleDormer.jsx
@@ -1,6 +1,7 @@
import Image from 'next/image'
import { useMessage } from '@/hooks/useMessage'
import { forwardRef, useState } from 'react'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
const TriangleDormer = forwardRef((props, refs) => {
const { getMessage } = useMessage()
@@ -11,6 +12,9 @@ const TriangleDormer = forwardRef((props, refs) => {
setDirection(e.target.value)
refs.directionRef.current = e.target.value
}
+const [height, setHeight] = useState(1500)
+const [offset, setOffset] = useState(400)
+const [pitch, setPitch] = useState(4)
return (
<>
@@ -30,7 +34,20 @@ const TriangleDormer = forwardRef((props, refs) => {
@@ -41,7 +58,20 @@ const TriangleDormer = forwardRef((props, refs) => {
@@ -52,7 +82,20 @@ const TriangleDormer = forwardRef((props, refs) => {
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)