지붕면 할당 시에도 실치수 적용 추가

This commit is contained in:
hyojun.choi 2025-04-17 16:40:40 +09:00
parent a3b62db4fa
commit 76938af446
2 changed files with 18 additions and 0 deletions

View File

@ -40,6 +40,7 @@ export default function useMenu() {
const [settingModalFirstOptions, setSettingModalFirstOptions] = useRecoilState(settingModalFirstOptionsState)
const handleMenu = (type) => {
if (type === 'outline') {
// 지붕 덮개 메뉴의 경우는 복도치수로 적용한다.
setSettingModalFirstOptions((prev) => {
return {
...prev,
@ -81,6 +82,7 @@ export default function useMenu() {
}
if (type === 'surface') {
// 배치면 메뉴의 경우는 실치수로 적용한다.
setSettingModalFirstOptions((prev) => {
return {
...prev,
@ -113,6 +115,7 @@ export default function useMenu() {
}
if (type === 'module') {
// 모듈,회로 구성 메뉴의 경우는 실치수로 적용한다.
setSettingModalFirstOptions((prev) => {
return {
...prev,

View File

@ -11,6 +11,7 @@ import {
roofDisplaySelector,
roofMaterialsSelector,
selectedRoofMaterialSelector,
settingModalFirstOptionsState,
} from '@/store/settingAtom'
import { usePopup } from '@/hooks/usePopup'
import { POLYGON_TYPE } from '@/common/common'
@ -57,6 +58,7 @@ export function useRoofAllocationSetting(id) {
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState)
const resetPoints = useResetRecoilState(outerLinePointsState)
const [settingModalFirstOptions, setSettingModalFirstOptions] = useRecoilState(settingModalFirstOptionsState)
useEffect(() => {
/** 배치면 초기설정에서 선택한 지붕재 배열 설정 */
@ -428,6 +430,19 @@ export function useRoofAllocationSetting(id) {
setEditingLines([])
closeAll()
setSelectedMenu('surface')
//지붕면 완성 후 실측치 로 보이도록 수정
setSettingModalFirstOptions((prev) => {
return {
...prev,
dimensionDisplay: prev.dimensionDisplay.map((item, index) => {
if (index === 1) {
return { ...item, selected: true }
} else {
return { ...item, selected: false }
}
}),
}
})
/** 모듈 선택 데이터 초기화 */
modifyModuleSelectionData()