mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-21 22:44:42 +00:00
Merge pull request #537 from Kienz/shadowBrush
Fix reset shadow of fabric brushes
This commit is contained in:
commit
2c7205fec1
2 changed files with 5 additions and 15 deletions
|
|
@ -65,11 +65,9 @@ fabric.BaseBrush = fabric.util.createClass({
|
|||
setShadowStyles: function() {
|
||||
var ctx = this.canvas.contextTop;
|
||||
|
||||
if (this.shadowBlur) {
|
||||
ctx.shadowBlur = this.shadowBlur;
|
||||
ctx.shadowColor = this.shadowColor || this.color;
|
||||
ctx.shadowOffsetX = this.shadowOffsetX;
|
||||
ctx.shadowOffsetY = this.shadowOffsetY;
|
||||
}
|
||||
ctx.shadowBlur = this.shadowBlur;
|
||||
ctx.shadowColor = this.shadowColor || this.color;
|
||||
ctx.shadowOffsetX = this.shadowOffsetX;
|
||||
ctx.shadowOffsetY = this.shadowOffsetY;
|
||||
}
|
||||
});
|
||||
|
|
@ -29,15 +29,7 @@ fabric.CircleBrush = fabric.util.createClass( fabric.BaseBrush, /** @scope fabri
|
|||
onMouseDown: function() {
|
||||
this.points.length = 0;
|
||||
this.canvas.clearContext(this.canvas.contextTop);
|
||||
|
||||
var ctx = this.canvas.contextTop;
|
||||
|
||||
if (this.shadowBlur) {
|
||||
ctx.shadowBlur = this.shadowBlur;
|
||||
ctx.shadowColor = this.shadowColor || this.color;
|
||||
ctx.shadowOffsetX = this.shadowOffsetX;
|
||||
ctx.shadowOffsetY = this.shadowOffsetY;
|
||||
}
|
||||
this.setShadowStyles();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue