diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 85bb03dd..f19687aa 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -136,8 +136,20 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { this.on('removed', () => { // const children = getAllRelatedObjects(this.id, this.canvas) const children = this.canvas.getObjects().filter((obj) => obj.parentId === this.id) + children.forEach((child) => { this.canvas.remove(child) + + //그룹일때 + if (child.hasOwnProperty('_objects')) { + child._objects.forEach((obj) => { + if (obj.hasOwnProperty('texts')) { + obj.texts.forEach((text) => { + this.canvas?.remove(text) + }) + } + }) + } }) })