Merge pull request #1189 from danzel/canvas-fixes

Always set canvas alpha. Fixes #1186
This commit is contained in:
Vladimir Agafonkin 2012-11-29 15:01:19 -08:00
commit 7f44313fad

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();
}