From ddb0d36e74bd702f4792348a43ebd8e28e3d7e53 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Fri, 9 Aug 2024 17:28:28 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9B=8C=EC=BD=98=20=EC=9E=91?= =?UTF-8?q?=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/fabric/QPolygon.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 6c4c7f5e..b2586724 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -501,10 +501,12 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { const allPointsInside = rectPoints.every((point) => this.inPolygonABType(point.x, point.y, points)) if (allPointsInside) { - const text = new fabric.Text(`col ${i}, row ${j}`, { + //먼저 그룹화를 시켜놓고 뒤에서 글씨를 넣어서 변경한다 + const text = new fabric.Text(``, { fontFamily: 'serif', - fontSize: 10, + fontSize: 30, fill: 'black', + type: 'cellText', }) const rect = new fabric.Rect({ @@ -523,6 +525,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { opacity: 0.8, name: 'cell', idx: idx, + type: 'cellRect', }) var group = new fabric.Group([rect, text], {