module이 없을 경우에는 directionText 제거

This commit is contained in:
hyojun.choi 2025-03-04 17:51:26 +09:00
parent 9e9dc6de2c
commit bc07fc9e04

View File

@ -27,10 +27,12 @@ export function useOrientation() {
setCompasDeg(0)
}
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
/*roofs.forEach((roof) => {
roof.directionText = null
})*/
const hasModules = canvas.getObjects().some((obj) => obj.name === 'module')
if (!hasModules) {
roofs.forEach((roof) => {
delete roof.directionText
})
}
roofs.forEach((roof) => {
roof.set({