From ff34dbd28636762be169ed79a559e7243f8f40d9 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 5 Mar 2025 14:29:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B0=EC=B9=98=EB=A9=B4=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=EC=84=A4=EC=A0=95=20=EA=B2=BD=EC=82=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20=EB=B0=98=EC=98=81=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/placementShape/PlacementShapeSetting.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx index ccf6ed4b..d836147c 100644 --- a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx +++ b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx @@ -16,6 +16,8 @@ import { globalLocaleStore } from '@/store/localeAtom' import { onlyNumberInputChange } from '@/util/input-utils' import { getChonByDegree, getDegreeByChon } from '@/util/canvas-util' +import { usePolygon } from '@/hooks/usePolygon' +import { canvasState } from '@/store/canvasAtom' /** * 지붕 레이아웃 @@ -38,6 +40,8 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla const [raftCodes, setRaftCodes] = useState([]) /** 서까래 정보 */ const [currentRoof, setCurrentRoof] = useState(null) /** 현재 선택된 지붕재 정보 */ const { closePopup } = usePopup() /** usePopup에서 closePopup 함수 가져오기 */ + const { drawDirectionArrow } = usePolygon() + const canvas = useRecoilValue(canvasState) const roofRef = { roofCd: useRef(null), @@ -236,6 +240,13 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla }, }) + const roofs = canvas.getObjects().filter((obj) => obj.roofMaterial?.index === 0) + + roofs.forEach((roof) => { + roof.roofMaterial = { ...roofInfo } + drawDirectionArrow(roof) + }) + /* 저장 후 화면 닫기 */ closePopup(id) }