From b0b87bbd662c5e7014fa8e432ce1d9b3ebe4ef17 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 16 Dec 2025 13:34:52 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=EC=A7=80=EB=B6=95=EB=A9=B4=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=ED=9B=84=20=EC=84=A0=ED=83=9D=20=EC=A0=9C=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=EC=95=88=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=EC=A7=80=EB=B6=95=EB=A9=B4=20=ED=95=A0?= =?UTF-8?q?=EB=8B=B9=20=EC=8B=9C=20=EB=B0=A9=ED=96=A5=20=ED=99=94=EC=82=B4?= =?UTF-8?q?=ED=91=9C=20=EC=A0=84=EB=B6=80=20=EB=82=A8=EC=AA=BD=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/common.js | 1 + src/hooks/surface/useSurfaceShapeBatch.js | 10 +++- src/hooks/usePolygon.js | 72 ++++++++++++----------- 3 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/common/common.js b/src/common/common.js index 60a57c76..76632014 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -61,6 +61,7 @@ export const LINE_TYPE = { */ DEFAULT: 'default', EAVES: 'eaves', + EAVE_HELP_LINE: 'eaveHelpLine', GABLE: 'gable', GABLE_LEFT: 'gableLeft', //케라바 왼쪽 GABLE_RIGHT: 'gableRight', //케라바 오른쪽 diff --git a/src/hooks/surface/useSurfaceShapeBatch.js b/src/hooks/surface/useSurfaceShapeBatch.js index 54721d94..b26ee195 100644 --- a/src/hooks/surface/useSurfaceShapeBatch.js +++ b/src/hooks/surface/useSurfaceShapeBatch.js @@ -1,7 +1,13 @@ 'use client' import { useRecoilValue, useResetRecoilState } from 'recoil' -import { canvasSettingState, canvasState, currentCanvasPlanState, currentObjectState, globalPitchState } from '@/store/canvasAtom' +import { + canvasSettingState, + canvasState, + currentCanvasPlanState, + currentObjectState, + globalPitchState, +} from '@/store/canvasAtom' import { LINE_TYPE, MENU, POLYGON_TYPE } from '@/common/common' import { getIntersectionPoint } from '@/util/canvas-util' import { degreesToRadians } from '@turf/turf' @@ -879,7 +885,7 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) { } }) - // roof.fire('polygonMoved') + roof.fire('polygonMoved') roof.fire('modified') drawDirectionArrow(roof) changeCorridorDimensionText() diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index 5e21e902..fe8fbd78 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -856,7 +856,7 @@ export const usePolygon = () => { if (innerLine.attributes && polygonLine.attributes.type) { // innerLine이 polygonLine보다 긴 경우 polygonLine.need를 false로 변경 if (polygonLine.length < innerLine.length) { - if(polygonLine.lineName !== 'eaveHelpLine'){ + if (polygonLine.lineName !== 'eaveHelpLine') { polygonLine.need = false } } @@ -867,7 +867,6 @@ export const usePolygon = () => { // innerLine.attributes.isStart = true // innerLine.parentLine = polygonLine - // 매핑된 innerLine의 attributes를 변경 (교차점 계산 전에 적용) innerLineMapping.forEach((polygonLine, innerLine) => { innerLine.attributes.planeSize = innerLine.attributes.planeSize ?? polygonLine.attributes.planeSize @@ -877,7 +876,6 @@ export const usePolygon = () => { innerLine.attributes.isStart = true innerLine.parentLine = polygonLine }) - } } }) @@ -1387,7 +1385,7 @@ export const usePolygon = () => { let representLine // 지붕을 그리면서 기존 polygon의 line중 연결된 line을 찾는다. - [...polygonLines, ...innerLines].forEach((line) => { + ;[...polygonLines, ...innerLines].forEach((line) => { let startFlag = false let endFlag = false const startPoint = line.startPoint @@ -1402,7 +1400,10 @@ export const usePolygon = () => { }) if (startFlag && endFlag) { - if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.EAVES) { + if ( + !representLines.includes(line) && + (line.attributes.type === LINE_TYPE.WALLLINE.EAVES || line.attributes.type === LINE_TYPE.WALLLINE.EAVE_HELP_LINE) + ) { representLines.push(line) } else if (!representLines.includes(line) && line.attributes.type === LINE_TYPE.WALLLINE.HIPANDGABLE) { representLines.push(line) @@ -1630,79 +1631,80 @@ export const usePolygon = () => { // } function findShortestPath(start, end, graph, epsilon = 1) { - const startKey = pointToKey(start, epsilon); - const endKey = pointToKey(end, epsilon); + const startKey = pointToKey(start, epsilon) + const endKey = pointToKey(end, epsilon) // 거리와 이전 노드 추적 - const distances = { [startKey]: 0 }; - const previous = {}; - const visited = new Set(); + const distances = { [startKey]: 0 } + const previous = {} + const visited = new Set() // 우선순위 큐 (거리가 짧은 순으로 정렬) - const queue = [{ key: startKey, dist: 0 }]; + const queue = [{ key: startKey, dist: 0 }] // 모든 노드 초기화 for (const key in graph) { if (key !== startKey) { - distances[key] = Infinity; + distances[key] = Infinity } } // 우선순위 큐에서 다음 노드 선택 const getNextNode = () => { - if (queue.length === 0) return null; - queue.sort((a, b) => a.dist - b.dist); - return queue.shift(); - }; + if (queue.length === 0) return null + queue.sort((a, b) => a.dist - b.dist) + return queue.shift() + } - let current; + let current while ((current = getNextNode())) { - const currentKey = current.key; + const currentKey = current.key // 목적지에 도달하면 종료 - if (currentKey === endKey) break; + if (currentKey === endKey) break // 이미 방문한 노드는 건너뜀 - if (visited.has(currentKey)) continue; - visited.add(currentKey); + if (visited.has(currentKey)) continue + visited.add(currentKey) // 인접 노드 탐색 for (const neighbor of graph[currentKey] || []) { - const neighborKey = pointToKey(neighbor.point, epsilon); - if (visited.has(neighborKey)) continue; + const neighborKey = pointToKey(neighbor.point, epsilon) + if (visited.has(neighborKey)) continue - const alt = distances[currentKey] + neighbor.distance; + const alt = distances[currentKey] + neighbor.distance // 더 짧은 경로를 찾은 경우 업데이트 if (alt < (distances[neighborKey] || Infinity)) { - distances[neighborKey] = alt; - previous[neighborKey] = currentKey; + distances[neighborKey] = alt + previous[neighborKey] = currentKey // 우선순위 큐에 추가 - queue.push({ key: neighborKey, dist: alt }); + queue.push({ key: neighborKey, dist: alt }) } } } // 경로 재구성 - const path = []; - let currentKey = endKey; + const path = [] + let currentKey = endKey // 시작점에 도달할 때까지 역추적 while (previous[currentKey] !== undefined) { - const [x, y] = currentKey.split(',').map(Number); - path.unshift({ x, y }); - currentKey = previous[currentKey]; + const [x, y] = currentKey.split(',').map(Number) + path.unshift({ x, y }) + currentKey = previous[currentKey] } // 시작점 추가 if (path.length > 0) { - const [sx, sy] = startKey.split(',').map(Number); - path.unshift({ x: sx, y: sy }); + const [sx, sy] = startKey.split(',').map(Number) + path.unshift({ x: sx, y: sy }) } - return path.length > 0 ? path : null; + return path.length > 0 ? path : null } + // 최종 함수 function getPath(start, end, graph, epsilon = 1) { // startPoint와 arrivalPoint가 될 수 있는 점은 line.attributes.type이 'default' 혹은 null이 아닌 line인 경우에만 가능 From f9f29223e473767392f036b7d58f3d565767ffad Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 15:49:40 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=EA=B0=9C=EA=B5=AC=20:=20=EA=B3=84=EC=82=B0?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/object/DormerOffset.jsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/components/floor-plan/modal/object/DormerOffset.jsx b/src/components/floor-plan/modal/object/DormerOffset.jsx index 1881b18e..fd03f185 100644 --- a/src/components/floor-plan/modal/object/DormerOffset.jsx +++ b/src/components/floor-plan/modal/object/DormerOffset.jsx @@ -59,10 +59,10 @@ export default function DormerOffset(props) { name="" label="" className="input-origin block" - value={arrow1LengthRef.current.value ?? 0} + value={arrow1LengthRef.current?.value ?? 0} ref={arrow1LengthRef} - onChange={(value) => setArrow1Length(value)} - options={{ + onChange={() => {}} // No-op function to prevent error + options={{ allowNegative: false, allowDecimal: false, }} @@ -86,7 +86,20 @@ export default function DormerOffset(props) {
- + {/**/} + {}} // No-op function to prevent error + options={{ + allowNegative: false, + allowDecimal: false, + }} + />
mm
From 19bdaa52fd0136408d31aa1386e3fc1659ffc4b0 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 16:07:18 +0900 Subject: [PATCH 3/9] =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=84=A0=EB=A1=9C?= =?UTF-8?q?=EB=A7=8C=EB=93=A4=EA=B8=B0=20:=20=EA=B3=84=EC=82=B0=EA=B8=B0?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/roofShape/passivity/Eaves.jsx | 15 ++++++++++++++- .../modal/roofShape/passivity/Gable.jsx | 16 +++++++++++++++- .../modal/roofShape/passivity/Shed.jsx | 16 +++++++++++++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx b/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx index fac8701e..f3dd4052 100644 --- a/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx +++ b/src/components/floor-plan/modal/roofShape/passivity/Eaves.jsx @@ -43,7 +43,20 @@ export default function Eaves({ offsetRef, pitchRef, pitchText }) { {getMessage('eaves.offset')}
- + {/**/} + {}} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
diff --git a/src/components/floor-plan/modal/roofShape/passivity/Gable.jsx b/src/components/floor-plan/modal/roofShape/passivity/Gable.jsx index 6da1266e..fe04a65e 100644 --- a/src/components/floor-plan/modal/roofShape/passivity/Gable.jsx +++ b/src/components/floor-plan/modal/roofShape/passivity/Gable.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import { useRecoilValue } from 'recoil' import { currentAngleTypeSelector } from '@/store/canvasAtom' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Gable({ offsetRef }) { const { getMessage } = useMessage() @@ -12,7 +13,20 @@ export default function Gable({ offsetRef }) { {getMessage('gable.offset')}
- + {/**/} + {}} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
diff --git a/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx b/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx index 474c2f60..67a47bb0 100644 --- a/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx +++ b/src/components/floor-plan/modal/roofShape/passivity/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() @@ -9,7 +10,20 @@ export default function Shed({ offsetRef }) { {getMessage('shed.width')}
- + {/**/} + {}} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm From 4f483dbfee2518492a838e76cebfc35f8274e13d Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 16:20:26 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=EC=99=B8=EB=B2=BD=ED=8E=B8=EC=A7=91?= =?UTF-8?q?=EC=98=A4=EB=B8=8C=EC=85=8B=20:=20=EA=B3=84=EC=82=B0=EA=B8=B0?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/wallLineOffset/type/Offset.jsx | 16 ++++++++- .../modal/wallLineOffset/type/WallLine.jsx | 33 +++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx index 76f09cc7..79ae0898 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' import { useEffect, useState } from 'react' import { useEvent } from '@/hooks/useEvent' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) { const { getMessage } = useMessage() @@ -74,7 +75,20 @@ export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) {
- + {/**/} + {}} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
diff --git a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx index 92f6a10b..d78a202f 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx @@ -1,6 +1,7 @@ import { useMessage } from '@/hooks/useMessage' 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) { const { getMessage } = useMessage() @@ -46,7 +47,21 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref,
- + {/**/} + {}} + readOnly={type !== 1} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
@@ -80,7 +95,21 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref,
- + {/**/} + {}} + readOnly={type !== 2} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
From bbf2dfbe7c92cb62579c6691c608f7caee7fb9c3 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 17:14:47 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=84=A0=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=A6=88=EB=B3=80=EA=B2=BD=20:=20=EA=B3=84=EC=82=B0?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/auxiliary/AuxiliarySize.jsx | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx b/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx index 5a9cde6f..40fb9f76 100644 --- a/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx +++ b/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx @@ -8,19 +8,21 @@ import { useEffect, useState } from 'react' import Big from 'big.js' import { calcLineActualSize, calcLinePlaneSize } from '@/util/qpolygon-utils' import { normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function AuxiliarySize(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) const { id, pos = contextPopupPosition } = props const [checkedRadio, setCheckedRadio] = useState(null) - const [value1, setValue1] = useState(null) - const [value2, setValue2] = useState(null) + const [value1, setValue1] = useState('') + const [value2, setValue2] = useState('') const [size, setSize] = useState(0) const { getMessage } = useMessage() const { closePopup } = usePopup() const currentObject = useRecoilValue(currentObjectState) const canvas = useRecoilValue(canvasState) + useEffect(() => { return () => { canvas?.discardActiveObject() @@ -37,7 +39,7 @@ export default function AuxiliarySize(props) { }, [currentObject]) const handleInput = (e) => { - let value = e.target.value.replace(/^0+/, '') + let value = e.replace(/^0+/, '') if (value === '') { if (checkedRadio === 1) setValue1(value) if (checkedRadio === 2) setValue2(value) @@ -130,7 +132,20 @@ export default function AuxiliarySize(props) {
{getMessage('length')}
- + {/**/} +
mm
@@ -149,7 +164,20 @@ export default function AuxiliarySize(props) {
{getMessage('length')}
- + {/**/} +
mm
From b81fc389f53b54bf2246aeef29f1d747e20ec790 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 17:20:28 +0900 Subject: [PATCH 6/9] =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=84=A0=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=EB=B3=B5=EC=82=AC=20:=20=EA=B3=84=EC=82=B0=EA=B8=B0?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/auxiliary/AuxiliaryEdit.jsx | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx b/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx index 938b5244..d7696a84 100644 --- a/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx +++ b/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx @@ -8,6 +8,7 @@ import { currentObjectState } from '@/store/canvasAtom' import { useAuxiliaryDrawing } from '@/hooks/roofcover/useAuxiliaryDrawing' import { useSwal } from '@/hooks/useSwal' import { normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' export default function AuxiliaryEdit(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) @@ -66,7 +67,19 @@ export default function AuxiliaryEdit(props) {

{getMessage('length')}

- setVerticalSize(normalizeDigits(e.target.value))} /> + {/* setVerticalSize(normalizeDigits(e.target.value))} />*/} + setVerticalSize(value)} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
@@ -88,7 +101,19 @@ export default function AuxiliaryEdit(props) {
- setHorizonSize(normalizeDigits(e.target.value))} /> + {/* setHorizonSize(normalizeDigits(e.target.value))} />*/} + setHorizonSize(value)} + options={{ + allowNegative: false, + allowDecimal: false + }} + />
mm
From 6f47b9dc540219b5292e004fb986a4c33c2d01b2 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 17:39:28 +0900 Subject: [PATCH 7/9] =?UTF-8?q?=EB=A9=B4=ED=98=95=EC=83=81=EB=B0=B0?= =?UTF-8?q?=EC=B9=98=20:=20=EA=B3=84=EC=82=B0=EA=B8=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../placementSurface/PlacementSurface.jsx | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx b/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx index 7ab89106..4ede1367 100644 --- a/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx +++ b/src/components/floor-plan/modal/placementSurface/PlacementSurface.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 PlacementSurface = forwardRef((props, refs) => { const { getMessage } = useMessage() @@ -74,10 +75,32 @@ const PlacementSurface = forwardRef((props, refs) => {
- */} + + {}} ref={ line.isDiagonal ? lengthetc @@ -91,6 +114,10 @@ const PlacementSurface = forwardRef((props, refs) => { ? length4 : length5 } + options={{ + allowNegative: false, + allowDecimal: false + }} />
mm From 8eeff43b4c4824e377e8aad21313b8018ddb3f00 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 16 Dec 2025 17:52:41 +0900 Subject: [PATCH 8/9] =?UTF-8?q?=EC=A7=80=EB=B6=95=EC=9E=AC=20=ED=95=A0?= =?UTF-8?q?=EB=8B=B9=20=EC=A0=84=20=EC=A7=80=EB=B6=95=20=EC=98=AE=EA=B8=B8?= =?UTF-8?q?=20=EC=8B=9C=20outerLinePoints=20=EC=A2=8C=ED=91=9C=EB=8F=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=ED=95=84=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/common/useRoofFn.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/common/useRoofFn.js b/src/hooks/common/useRoofFn.js index eb640d76..1148eed3 100644 --- a/src/hooks/common/useRoofFn.js +++ b/src/hooks/common/useRoofFn.js @@ -1,4 +1,4 @@ -import { useRecoilValue, useResetRecoilState } from 'recoil' +import { useRecoilState, useRecoilValue, useResetRecoilState } from 'recoil' import { canvasState, currentObjectState } from '@/store/canvasAtom' import { selectedRoofMaterialSelector } from '@/store/settingAtom' import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting' @@ -25,6 +25,7 @@ export function useRoofFn() { const { addPitchText } = useLine() const { setPolygonLinesActualSize } = usePolygon() const { changeCorridorDimensionText } = useText() + const [outerLinePoints, setOuterLinePoints] = useRecoilState(outerLinePointsState) //면형상 선택 클릭시 지붕 패턴 입히기 function setSurfaceShapePattern(polygon, mode = 'onlyBorder', trestleMode = false, roofMaterial, isForceChange = false, isDisplay = false) { @@ -263,6 +264,9 @@ export function useRoofFn() { const deltaX = roof.left - originalRoofLeft const deltaY = roof.top - originalRoofTop + const originOuterLinePoints = [...outerLinePoints] + setOuterLinePoints(originOuterLinePoints.map((point) => ({ x: point.x + deltaX, y: point.y + deltaY }))) + // Move all related objects by the delta allRoofObject.forEach((obj) => { if (obj.points !== undefined) { From 7bf2db7479b4221ea749066b8755ca9aeb86b2ca Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 16 Dec 2025 17:58:46 +0900 Subject: [PATCH 9/9] =?UTF-8?q?=EB=8F=99=EC=9D=B4=EB=8F=99=ED=98=84?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=20:=20=EA=B3=84=EC=82=B0=EA=B8=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/movement/type/FlowLine.jsx | 21 +++++++++++++++--- .../floor-plan/modal/movement/type/Updown.jsx | 22 ++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/components/floor-plan/modal/movement/type/FlowLine.jsx b/src/components/floor-plan/modal/movement/type/FlowLine.jsx index 7c400fd4..d4267a27 100644 --- a/src/components/floor-plan/modal/movement/type/FlowLine.jsx +++ b/src/components/floor-plan/modal/movement/type/FlowLine.jsx @@ -2,6 +2,7 @@ import { useMessage } from '@/hooks/useMessage' import { useState } from 'react' import { currentObjectState } from '@/store/canvasAtom' import { useRecoilValue } from 'recoil' +import { CalculatorInput } from '@/components/common/input/CalcInput' const FLOW_LINE_TYPE = { DOWN_LEFT: 'downLeft', @@ -69,13 +70,27 @@ export default function FlowLine({ FLOW_LINE_REF }) {
{getMessage('modal.movement.flow.line.movement')}
- */} + {setFilledInput(value)}} + options={{ + allowNegative: false, + allowDecimal: false + }} />
mm diff --git a/src/components/floor-plan/modal/movement/type/Updown.jsx b/src/components/floor-plan/modal/movement/type/Updown.jsx index f03685e7..ab88bbbf 100644 --- a/src/components/floor-plan/modal/movement/type/Updown.jsx +++ b/src/components/floor-plan/modal/movement/type/Updown.jsx @@ -3,6 +3,7 @@ import { useState } from 'react' import { useRecoilValue } from 'recoil' import { currentObjectState } from '@/store/canvasAtom' import { normalizeDigits } from '@/util/input-utils' +import { CalculatorInput } from '@/components/common/input/CalcInput' const UP_DOWN_TYPE = { UP: 'up', @@ -35,6 +36,7 @@ export default function Updown({ UP_DOWN_REF }) { {getMessage('modal.movement.flow.line.position')}
+
@@ -68,13 +70,27 @@ export default function Updown({ UP_DOWN_REF }) {
{getMessage('modal.movement.flow.line.movement')}
- */} + {setFilledInput(value)}} + options={{ + allowNegative: false, + allowDecimal: false + }} />
mm