mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-05 23:11:02 +00:00
Merge pull request #387 from iFixit/master
Add createJPEGStream method for fabric canvas
This commit is contained in:
commit
bf61e2a2b0
1 changed files with 5 additions and 1 deletions
|
|
@ -121,6 +121,10 @@
|
|||
return this.nodeCanvas.createPNGStream();
|
||||
};
|
||||
|
||||
fabric.StaticCanvas.prototype.createJPEGStream = function(opts) {
|
||||
return this.nodeCanvas.createJPEGStream(opts);
|
||||
};
|
||||
|
||||
var origSetWidth = fabric.StaticCanvas.prototype.setWidth;
|
||||
fabric.StaticCanvas.prototype.setWidth = function(width) {
|
||||
origSetWidth.call(this);
|
||||
|
|
@ -141,4 +145,4 @@
|
|||
fabric.Canvas.prototype.setHeight = fabric.StaticCanvas.prototype.setHeight;
|
||||
}
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue