mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-07 07:51:00 +00:00
adds , {backstoreOnly: true} for toDataURL export (#4254)
adds the backstoreOnly to __toDataURLWithMultiplier's setDimensions calls to prevent the canvas from resizing in the browser window when the canvas.toDataURL() method is called per issue #4252
This commit is contained in:
parent
69d377b992
commit
db6510be67
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@
|
|||
// setting interactive to false avoid exporting controls
|
||||
this.interactive = false;
|
||||
if (origWidth !== scaledWidth || origHeight !== scaledHeight) {
|
||||
this.setDimensions({ width: scaledWidth, height: scaledHeight });
|
||||
this.setDimensions({ width: scaledWidth, height: scaledHeight }, {backstoreOnly: true});
|
||||
}
|
||||
// call a renderAll to force sync update. This will cancel the scheduled requestRenderAll
|
||||
// from setDimensions
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
this.viewportTransform = vp;
|
||||
//setDimensions with no option object is taking care of:
|
||||
//this.width, this.height, this.requestRenderAll()
|
||||
this.setDimensions({ width: origWidth, height: origHeight });
|
||||
this.setDimensions({ width: origWidth, height: origHeight }, {backstoreOnly: true});
|
||||
return data;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue