diff --git a/src/circle.class.js b/src/circle.class.js index 28c6419a..db39ffc3 100644 --- a/src/circle.class.js +++ b/src/circle.class.js @@ -72,7 +72,7 @@ _render: function(ctx, noTransform) { ctx.beginPath(); // multiply by currently set alpha (the one that was set by path group where this object is contained, for example) - ctx.globalAlpha *= this.opacity; + ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity; ctx.arc(noTransform ? this.left : 0, noTransform ? this.top : 0, this.radius, 0, piBy2, false); ctx.closePath(); if (this.fill) { diff --git a/src/ellipse.class.js b/src/ellipse.class.js index 07f25329..cdd99a82 100644 --- a/src/ellipse.class.js +++ b/src/ellipse.class.js @@ -89,7 +89,7 @@ _render: function(ctx, noTransform) { ctx.beginPath(); ctx.save(); - ctx.globalAlpha *= this.opacity; + ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity; if (this.transformMatrix && this.group) { ctx.translate(this.cx, this.cy); } diff --git a/src/rect.class.js b/src/rect.class.js index c881471c..3f85e33c 100644 --- a/src/rect.class.js +++ b/src/rect.class.js @@ -87,7 +87,7 @@ h = this.height; ctx.beginPath(); - ctx.globalAlpha *= this.opacity; + ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity; if (this.transformMatrix && this.group) { ctx.translate(