first line second line no break third line no break
first line
fabric.LabeledRect = fabric.util.createClass(fabric.Rect, { | |
type: 'labeledRect', | |
toObject: function() { | |
return fabric.util.object.extend(this.callSuper('toObject'), { | |
label: this.get('label') | |
}); | |
}, |
fabric.TextboxWithPadding = fabric.util.createClass(fabric.Textbox, { | |
type: 'textboxwithpadding', | |
toObject: function() { | |
return fabric.util.object.extend(this.callSuper('toObject'), { | |
backgroundColor: this.get('backgroundColor'), | |
padding: this.get('padding'), | |
}); | |
}, |
const convert = (blob) => { | |
var reader = new FileReader(); | |
return new Promise((resolve, reject) => { | |
reader.onloadend = () => { | |
var base64data = reader.result; | |
resolve(base64data); | |
} | |
reader.readAsDataURL(blob); | |
}); |