This commit is contained in:
hyojun.choi 2024-11-12 14:42:54 +09:00
commit 6531949e40
2 changed files with 9 additions and 7 deletions

View File

@ -166,9 +166,9 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
}, },
initLines() { initLines() {
if (this.lines.length > 0) { // if (this.lines.length > 0) {
return // return
} // }
this.lines = [] this.lines = []

View File

@ -118,12 +118,14 @@ export function useCanvas(id) {
//QLine에 커스텀 어트리뷰트 넣기 //QLine에 커스텀 어트리뷰트 넣기
if (this.type === 'QLine') { if (this.type === 'QLine') {
if (this.attributes) {
this.attributes.type = this.attributes.type || 'default' this.attributes.type = this.attributes.type || 'default'
source.attributes = { source.attributes = {
...this.attributes, ...this.attributes,
type: this.attributes.type, type: this.attributes.type,
} }
} }
}
return fabric.util.object.extend(this.callSuper('toObject', propertiesToInclude), source) return fabric.util.object.extend(this.callSuper('toObject', propertiesToInclude), source)
} }