Always set canvas alpha. Fixes #1186

This commit is contained in:
danzel 2012-11-30 11:31:22 +13:00
parent 1d14b0c50d
commit 3b2393bd93

View File

@ -103,16 +103,12 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
this._updateStyle();
if (options.fill) {
if (options.fillOpacity < 1) {
ctx.globalAlpha = options.fillOpacity;
}
ctx.globalAlpha = options.fillOpacity;
ctx.fill();
}
if (options.stroke) {
if (options.opacity < 1) {
ctx.globalAlpha = options.opacity;
}
ctx.globalAlpha = options.opacity;
ctx.stroke();
}