diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 3a7d2020..ccffbc92 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -470,7 +470,7 @@ export default class QPolygon extends fabric.Group { setShape() { let shape = 0 if (this.lines.length !== 6) { - throw new Error('Only 6 points are allowed.') + return } //외각선 기준 const topIndex = findTopTwoIndexesByDistance(this.lines) //배열중에 큰 2값을 가져옴 TODO: 나중에는 인자로 받아서 다각으로 수정 해야됨 @@ -504,9 +504,6 @@ export default class QPolygon extends fabric.Group { * @returns {number} */ getShape() { - if (this.lines.length !== 6) { - throw new Error('Only 6 points are allowed.') - } return this.shape } } diff --git a/src/hooks/useMode.js b/src/hooks/useMode.js index 6d89a0df..c8db2ac6 100644 --- a/src/hooks/useMode.js +++ b/src/hooks/useMode.js @@ -392,8 +392,6 @@ export function useMode() { canvas, ) - console.log(polygon.getShape()) - // 새로운 다각형 객체를 캔버스에 추가합니다. canvas.add(polygon)