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) }