배치면 초기설정 경사 수정 시 반영되도록 수정
This commit is contained in:
parent
eb928fc4f2
commit
ff34dbd286
@ -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)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user