mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-11 23:33:10 +00:00
enlarge shadow if retina scaling is active
This commit is contained in:
parent
381f959f54
commit
db068d59c9
1 changed files with 4 additions and 1 deletions
|
|
@ -1109,7 +1109,10 @@
|
|||
|
||||
var multX = (this.canvas && this.canvas.viewportTransform[0]) || 1,
|
||||
multY = (this.canvas && this.canvas.viewportTransform[3]) || 1;
|
||||
|
||||
if (this._isRetinaScaling()) {
|
||||
multX *= fabric.devicePixelRatio;
|
||||
multY *= fabric.devicePixelRatio;
|
||||
}
|
||||
ctx.shadowColor = this.shadow.color;
|
||||
ctx.shadowBlur = this.shadow.blur * (multX + multY) * (this.scaleX + this.scaleY) / 4;
|
||||
ctx.shadowOffsetX = this.shadow.offsetX * multX * this.scaleX;
|
||||
|
|
|
|||
Loading…
Reference in a new issue