canvas 저장 시 값 추가

This commit is contained in:
hyojun.choi 2024-10-22 17:24:51 +09:00
parent 6c37af9ef3
commit 7ab481ec36
2 changed files with 4 additions and 1 deletions

View File

@ -5,10 +5,12 @@ import { setSurfaceShapePattern } from '@/util/canvas-util'
import { splitPolygonWithLines } from '@/util/qpolygon-utils' import { splitPolygonWithLines } from '@/util/qpolygon-utils'
import { useSwal } from '@/hooks/useSwal' import { useSwal } from '@/hooks/useSwal'
import { usePolygon } from '@/hooks/usePolygon' import { usePolygon } from '@/hooks/usePolygon'
import { roofDisplaySelector } from '@/store/settingAtom'
// 지붕면 할당 // 지붕면 할당
export function useRoofAllocationSetting(setShowRoofAllocationSettingModal) { export function useRoofAllocationSetting(setShowRoofAllocationSettingModal) {
const canvas = useRecoilValue(canvasState) const canvas = useRecoilValue(canvasState)
const roofDisplay = useRecoilValue(roofDisplaySelector)
const { drawDirectionArrow } = usePolygon() const { drawDirectionArrow } = usePolygon()
const { swalFire } = useSwal() const { swalFire } = useSwal()
@ -117,7 +119,7 @@ export function useRoofAllocationSetting(setShowRoofAllocationSettingModal) {
const roofs = canvas.getObjects().filter((obj) => obj.name === 'roof') const roofs = canvas.getObjects().filter((obj) => obj.name === 'roof')
roofs.forEach((roof) => { roofs.forEach((roof) => {
setSurfaceShapePattern(roof) setSurfaceShapePattern(roof, roofDisplay.column)
drawDirectionArrow(roof) drawDirectionArrow(roof)
}) })
setShowRoofAllocationSettingModal(false) setShowRoofAllocationSettingModal(false)

View File

@ -60,6 +60,7 @@ export function usePlan() {
'attributes', 'attributes',
'stickeyPoint', 'stickeyPoint',
'text', 'text',
'pitch',
]) ])
const str = JSON.stringify(objs) const str = JSON.stringify(objs)