fix shadow zoom level (#3475)

This commit is contained in:
Andrea Bogazzi 2016-12-01 23:10:07 +01:00 committed by GitHub
parent 10f8c55948
commit 929391ff36

View file

@ -85,12 +85,13 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
return;
}
var ctx = this.canvas.contextTop;
var ctx = this.canvas.contextTop,
zoom = this.canvas.getZoom();
ctx.shadowColor = this.shadow.color;
ctx.shadowBlur = this.shadow.blur;
ctx.shadowOffsetX = this.shadow.offsetX;
ctx.shadowOffsetY = this.shadow.offsetY;
ctx.shadowBlur = this.shadow.blur * zoom;
ctx.shadowOffsetX = this.shadow.offsetX * zoom;
ctx.shadowOffsetY = this.shadow.offsetY * zoom;
},
/**