모듈 선택 초기화 수정
This commit is contained in:
parent
e872df680d
commit
22f8cd3fa7
@ -123,6 +123,7 @@ export function useCanvasSetting(executeEffect = true) {
|
||||
const resetModuleSelectionData = useResetRecoilState(moduleSelectionDataState) /* 다음으로 넘어가는 최종 데이터 */
|
||||
const resetSelectedModules = useResetRecoilState(selectedModuleState) /* 선택된 모듈 */
|
||||
|
||||
const { trigger: orientationTrigger } = useCanvasPopupStatusController(1)
|
||||
const { trigger: moduleSelectedDataTrigger } = useCanvasPopupStatusController(2)
|
||||
|
||||
const [raftCodes, setRaftCodes] = useState([]) /* 서까래 정보 */
|
||||
@ -526,7 +527,10 @@ export function useCanvasSetting(executeEffect = true) {
|
||||
|
||||
/** 모듈 선택 데이터 초기화 */
|
||||
resetModuleSelectionData()
|
||||
moduleSelectedDataTrigger({ common: {}, module: {}, roofConstructions: [] })
|
||||
//1번 초기화
|
||||
orientationTrigger({ compasDeg: 0, common: {}, module: {} })
|
||||
//2번 초기화
|
||||
moduleSelectedDataTrigger({ roofConstructions: [] })
|
||||
const isModuleExist = canvas.getObjects().some((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
if (!isModuleExist) {
|
||||
resetSelectedModules()
|
||||
|
||||
@ -552,7 +552,7 @@ export function useRoofAllocationSetting(id) {
|
||||
const modifyModuleSelectionData = () => {
|
||||
if (moduleSelectionData.roofConstructions.length > 0) {
|
||||
setModuleSelectionData({ ...moduleSelectionData, roofConstructions: [] })
|
||||
moduleSelectedDataTrigger({ ...moduleSelectionData, roofConstructions: [] })
|
||||
moduleSelectedDataTrigger({ roofConstructions: [] })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user