diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index 3e24920c..61a3f672 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -429,7 +429,7 @@ export const usePolygon = () => { const sameDirectionCnt = canvas.getObjects().filter((obj) => { const onlyStrDirection = obj.directionText?.replace(/[0-9]/g, '') - return obj.name === POLYGON_TYPE.ROOF && onlyStrDirection === text + return obj.name === POLYGON_TYPE.ROOF && obj.visible && obj !== polygon && onlyStrDirection === text }) text = text + (sameDirectionCnt.length + 1)