diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index b0c46798..b8c3bbed 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -162,9 +162,10 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { }, initLines() { - // if (this.lines.length > 0) { - // return - // } + let attributes = null + if (this.lines.length > 0) { + attributes = this.lines.map((line) => line.attributes) + } this.lines = [] @@ -174,9 +175,11 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { stroke: this.stroke, strokeWidth: this.strokeWidth, fontSize: this.fontSize, - attributes: { - offset: 0, - }, + attributes: attributes + ? attributes[i] + : { + offset: 0, + }, textVisible: false, parent: this, parentId: this.id,