Skip to content

Commit

Permalink
fix shadow zoom level (#3475)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Dec 2, 2016
1 parent 2ce8c46 commit 5563cf5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/brushes/base_brush.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

/**
Expand Down

0 comments on commit 5563cf5

Please sign in to comment.