모듈 배치 첫 진입 시 moduleCompass null로 설정
This commit is contained in:
parent
0b815f8a16
commit
917a70e5dd
@ -3,6 +3,7 @@ import { canvasState } from '@/store/canvasAtom'
|
||||
import { usePolygon } from '@/hooks/usePolygon'
|
||||
import { POLYGON_TYPE } from '@/common/common'
|
||||
import { compasDegAtom } from '@/store/orientationAtom'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
// 모듈,회로 구성 탭 기본설정 > 방위설정 탭
|
||||
export function useOrientation() {
|
||||
@ -11,6 +12,16 @@ export function useOrientation() {
|
||||
|
||||
const { drawDirectionArrow } = usePolygon()
|
||||
|
||||
useEffect(() => {
|
||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
roofs.forEach((roof) => {
|
||||
roof.set({
|
||||
moduleCompass: null,
|
||||
})
|
||||
drawDirectionArrow(roof)
|
||||
})
|
||||
}, [])
|
||||
|
||||
const nextStep = () => {
|
||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
roofs.forEach((roof) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user