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'),
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convert = (blob) => { | |
var reader = new FileReader(); | |
return new Promise((resolve, reject) => { | |
reader.onloadend = () => { | |
var base64data = reader.result; | |
resolve(base64data); | |
} | |
reader.readAsDataURL(blob); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'), | |
}); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabric.LabeledRect = fabric.util.createClass(fabric.Rect, { | |
type: 'labeledRect', | |
toObject: function() { | |
return fabric.util.object.extend(this.callSuper('toObject'), { | |
label: this.get('label') | |
}); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
changeOptionValue(optionIndex, valueIndex, newValue) { | |
const state = this.state; | |
const newState = { | |
...state, | |
options: state.options.map((option, i) => | |
i === optionIndex ? | |
{ ...option, values: option.values.map((value, ii) => | |
ii === valueIndex ? | |
newValue : value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
class Loading extends React.Component { | |
render() { | |
return ( | |
<div style={{ | |
position: "fixed", | |
width: "100%", | |
height: "100%", | |
top: "0", |
NewerOlder