- 모듈이 있는 경우 배치면으로 다시 진입 시 모듈 제거 및 지붕면 할당 재 실행, 메뉴 배치면으로 수정

This commit is contained in:
hyojun.choi 2025-02-21 11:22:40 +09:00
parent e0006875c7
commit c52034ab53

View File

@ -48,6 +48,7 @@ import KO from '@/locales/ko.json'
import JA from '@/locales/ja.json'
import { QcastContext } from '@/app/QcastProvider'
import { useRoofFn } from '@/hooks/common/useRoofFn'
export default function CanvasMenu(props) {
const { menuNumber, setMenuNumber } = props
const pathname = usePathname()
@ -104,6 +105,7 @@ export default function CanvasMenu(props) {
const pwrGnrSimTypeRecoil = useRecoilValue(pwrGnrSimTypeState)
const { setIsGlobalLoading } = useContext(QcastContext)
const { setSurfaceShapePattern } = useRoofFn()
//
const { selectedPlan } = usePlan()
@ -190,6 +192,14 @@ export default function CanvasMenu(props) {
canvas.remove(moduleSurface)
})
canvas.renderAll()
onClickNav(menu)
canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.ROOF)
.forEach((roof) => {
roof.set({ selectable: true })
setSurfaceShapePattern(roof, null, false, roof.roofMaterial)
})
}
setType('surface')
},