From bc07fc9e047526e980590322349140fb3828e821 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 4 Mar 2025 17:51:26 +0900 Subject: [PATCH] =?UTF-8?q?module=EC=9D=B4=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=EC=97=90=EB=8A=94=20directionText=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useOrientation.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hooks/module/useOrientation.js b/src/hooks/module/useOrientation.js index cef2b5a6..649d8f79 100644 --- a/src/hooks/module/useOrientation.js +++ b/src/hooks/module/useOrientation.js @@ -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({