Compare commits
No commits in common. "a08c609caaa7f3e1be09e50f01b9d4ad7cfec83e" and "21dcdfb3efa979da50c664409f27f1ea4ae2bbbc" have entirely different histories.
a08c609caa
...
21dcdfb3ef
@ -16,13 +16,12 @@ import { usePopup } from '@/hooks/usePopup'
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import { useSurfaceShapeBatch } from '@/hooks/surface/useSurfaceShapeBatch'
|
import { useSurfaceShapeBatch } from '@/hooks/surface/useSurfaceShapeBatch'
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilValue } from 'recoil'
|
||||||
import { canvasState, currentMenuState } from '@/store/canvasAtom'
|
import { canvasState, currentMenuState } from '@/store/canvasAtom'
|
||||||
import { MENU } from '@/common/common'
|
import { MENU } from '@/common/common'
|
||||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||||
import { usePolygon } from '@/hooks/usePolygon'
|
import { usePolygon } from '@/hooks/usePolygon'
|
||||||
import { useOrientation } from '@/hooks/module/useOrientation'
|
import { useOrientation } from '@/hooks/module/useOrientation'
|
||||||
import { settingModalFirstOptionsState } from '@/store/settingAtom'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 메뉴 처리 훅
|
* 메뉴 처리 훅
|
||||||
@ -37,22 +36,8 @@ export default function useMenu() {
|
|||||||
const { deleteAllSurfacesAndObjects } = useSurfaceShapeBatch({})
|
const { deleteAllSurfacesAndObjects } = useSurfaceShapeBatch({})
|
||||||
const { clear: trestleClear, setAllModuleSurfaceIsComplete } = useTrestle()
|
const { clear: trestleClear, setAllModuleSurfaceIsComplete } = useTrestle()
|
||||||
const { nextStep } = useOrientation()
|
const { nextStep } = useOrientation()
|
||||||
const [settingModalFirstOptions, setSettingModalFirstOptions] = useRecoilState(settingModalFirstOptionsState)
|
|
||||||
const handleMenu = (type) => {
|
const handleMenu = (type) => {
|
||||||
if (type === 'outline') {
|
if (type === 'outline') {
|
||||||
// 지붕 덮개 메뉴의 경우는 복도치수로 적용한다.
|
|
||||||
setSettingModalFirstOptions((prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
dimensionDisplay: prev.dimensionDisplay.map((item, index) => {
|
|
||||||
if (index === 0) {
|
|
||||||
return { ...item, selected: true }
|
|
||||||
} else {
|
|
||||||
return { ...item, selected: false }
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
switch (currentMenu) {
|
switch (currentMenu) {
|
||||||
case MENU.ROOF_COVERING.EXTERIOR_WALL_LINE:
|
case MENU.ROOF_COVERING.EXTERIOR_WALL_LINE:
|
||||||
addPopup(popupId, 1, <WallLineSetting id={popupId} />)
|
addPopup(popupId, 1, <WallLineSetting id={popupId} />)
|
||||||
@ -82,19 +67,6 @@ export default function useMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'surface') {
|
if (type === 'surface') {
|
||||||
// 배치면 메뉴의 경우는 실치수로 적용한다.
|
|
||||||
setSettingModalFirstOptions((prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
dimensionDisplay: prev.dimensionDisplay.map((item, index) => {
|
|
||||||
if (index === 1) {
|
|
||||||
return { ...item, selected: true }
|
|
||||||
} else {
|
|
||||||
return { ...item, selected: false }
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
switch (currentMenu) {
|
switch (currentMenu) {
|
||||||
// case MENU.BATCH_CANVAS.SLOPE_SETTING:
|
// case MENU.BATCH_CANVAS.SLOPE_SETTING:
|
||||||
// addPopup(popupId, 1, <Slope id={popupId} />)
|
// addPopup(popupId, 1, <Slope id={popupId} />)
|
||||||
@ -115,19 +87,6 @@ export default function useMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'module') {
|
if (type === 'module') {
|
||||||
// 모듈,회로 구성 메뉴의 경우는 실치수로 적용한다.
|
|
||||||
setSettingModalFirstOptions((prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
dimensionDisplay: prev.dimensionDisplay.map((item, index) => {
|
|
||||||
if (index === 1) {
|
|
||||||
return { ...item, selected: true }
|
|
||||||
} else {
|
|
||||||
return { ...item, selected: false }
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
switch (currentMenu) {
|
switch (currentMenu) {
|
||||||
case MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING:
|
case MENU.MODULE_CIRCUIT_SETTING.BASIC_SETTING:
|
||||||
trestleClear()
|
trestleClear()
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import {
|
|||||||
roofDisplaySelector,
|
roofDisplaySelector,
|
||||||
roofMaterialsSelector,
|
roofMaterialsSelector,
|
||||||
selectedRoofMaterialSelector,
|
selectedRoofMaterialSelector,
|
||||||
settingModalFirstOptionsState,
|
|
||||||
} from '@/store/settingAtom'
|
} from '@/store/settingAtom'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { POLYGON_TYPE } from '@/common/common'
|
import { POLYGON_TYPE } from '@/common/common'
|
||||||
@ -59,7 +58,6 @@ export function useRoofAllocationSetting(id) {
|
|||||||
const [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
const [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
||||||
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState)
|
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState)
|
||||||
const resetPoints = useResetRecoilState(outerLinePointsState)
|
const resetPoints = useResetRecoilState(outerLinePointsState)
|
||||||
const [settingModalFirstOptions, setSettingModalFirstOptions] = useRecoilState(settingModalFirstOptionsState)
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
/** 배치면 초기설정에서 선택한 지붕재 배열 설정 */
|
/** 배치면 초기설정에서 선택한 지붕재 배열 설정 */
|
||||||
@ -435,19 +433,6 @@ export function useRoofAllocationSetting(id) {
|
|||||||
setEditingLines([])
|
setEditingLines([])
|
||||||
closeAll()
|
closeAll()
|
||||||
setSelectedMenu('surface')
|
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()
|
// modifyModuleSelectionData()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user