mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-09 14:24:44 +00:00
Update canvas_dataurl_exporter.mixin.js
This commit is contained in:
parent
bd345a39d5
commit
b4f99d96a9
1 changed files with 1 additions and 4 deletions
|
|
@ -115,19 +115,17 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
|
||||
var origWidth = this.getWidth(),
|
||||
origHeight = this.getHeight(),
|
||||
origRetinaScaling = this.enableRetinaScaling,
|
||||
scaledWidth = origWidth * multiplier,
|
||||
scaledHeight = origHeight * multiplier,
|
||||
activeObject = this.getActiveObject(),
|
||||
activeGroup = this.getActiveGroup(),
|
||||
ctx = this.contextContainer;
|
||||
|
||||
this.enableRetinaScaling = false;
|
||||
if (multiplier > 1) {
|
||||
this.setDimensions({ width: scaledWidth, height: scaledHeight });
|
||||
}
|
||||
ctx.save();
|
||||
ctx.scale(multiplier, multiplier);
|
||||
ctx.scale(multiplier / fabric.devicePixelRatio, multiplier / fabric.devicePixelRatio);
|
||||
|
||||
if (cropping.left) {
|
||||
cropping.left *= multiplier;
|
||||
|
|
@ -162,7 +160,6 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
// background properly (while context is scaled)
|
||||
this.width = origWidth;
|
||||
this.height = origHeight;
|
||||
this.enableRetinaScaling = origRetinaScaling;
|
||||
this.setDimensions({ width: origWidth, height: origHeight });
|
||||
|
||||
if (activeGroup) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue