지붕면 할당 시 배치면 메뉴로 이동
This commit is contained in:
parent
7e144ec320
commit
a1d8341044
@ -1,5 +1,5 @@
|
|||||||
import { useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'
|
||||||
import { canvasState, currentObjectState } from '@/store/canvasAtom'
|
import { canvasState, currentMenuState, currentObjectState } from '@/store/canvasAtom'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { setSurfaceShapePattern } from '@/util/canvas-util'
|
import { setSurfaceShapePattern } from '@/util/canvas-util'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
@ -10,6 +10,9 @@ import { POLYGON_TYPE } from '@/common/common'
|
|||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import ActualSizeSetting from '@/components/floor-plan/modal/roofAllocation/ActualSizeSetting'
|
import ActualSizeSetting from '@/components/floor-plan/modal/roofAllocation/ActualSizeSetting'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
|
import useMenu from '@/hooks/common/useMenu'
|
||||||
|
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||||
|
import { menuTypeState } from '@/store/menuAtom'
|
||||||
|
|
||||||
// 지붕면 할당
|
// 지붕면 할당
|
||||||
export function useRoofAllocationSetting(id) {
|
export function useRoofAllocationSetting(id) {
|
||||||
@ -21,6 +24,8 @@ export function useRoofAllocationSetting(id) {
|
|||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const currentObject = useRecoilValue(currentObjectState)
|
const currentObject = useRecoilValue(currentObjectState)
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
|
const { setMenuNumber } = useCanvasMenu()
|
||||||
|
const setMenuType = useSetRecoilState(menuTypeState)
|
||||||
const roofMaterials = [
|
const roofMaterials = [
|
||||||
{
|
{
|
||||||
id: 'A',
|
id: 'A',
|
||||||
@ -132,6 +137,9 @@ export function useRoofAllocationSetting(id) {
|
|||||||
setValues(values.filter((value) => value.id !== id))
|
setValues(values.filter((value) => value.id !== id))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { handleMenu } = useMenu()
|
||||||
|
const [currentMenu, setCurrentMenu] = useRecoilState(currentMenuState)
|
||||||
|
|
||||||
// 선택한 지붕재로 할당
|
// 선택한 지붕재로 할당
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
// 모두 actualSize 있으면 바로 적용 없으면 actualSize 설정
|
// 모두 actualSize 있으면 바로 적용 없으면 actualSize 설정
|
||||||
@ -213,6 +221,8 @@ export function useRoofAllocationSetting(id) {
|
|||||||
})
|
})
|
||||||
setEditingLines([])
|
setEditingLines([])
|
||||||
closeAll()
|
closeAll()
|
||||||
|
setMenuNumber(3)
|
||||||
|
setMenuType('surface')
|
||||||
}
|
}
|
||||||
|
|
||||||
const setLineSize = (id, size) => {
|
const setLineSize = (id, size) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user