fabric js canvas unit value code example
Example 1: fabricjs view onlyu
fabric.StaticCanvas
Example 2: how to save image in fabruc js json
fabric.Image.prototype.toObject = (function(toObject) {
return function() {
return fabric.util.object.extend(toObject.call(this), {
src: this.toDataURL()
});
};
})(fabric.Image.prototype.toObject);