저장 후 불러올 때 lines attributes 세팅
This commit is contained in:
parent
476e2f7cbc
commit
0ae09e17dd
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user