module이 없을 경우에는 directionText 제거
This commit is contained in:
parent
9e9dc6de2c
commit
bc07fc9e04
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user