Always set canvas alpha. Fixes #1186
This commit is contained in:
parent
1d14b0c50d
commit
3b2393bd93
@ -103,16 +103,12 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
|
|||||||
this._updateStyle();
|
this._updateStyle();
|
||||||
|
|
||||||
if (options.fill) {
|
if (options.fill) {
|
||||||
if (options.fillOpacity < 1) {
|
ctx.globalAlpha = options.fillOpacity;
|
||||||
ctx.globalAlpha = options.fillOpacity;
|
|
||||||
}
|
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.stroke) {
|
if (options.stroke) {
|
||||||
if (options.opacity < 1) {
|
ctx.globalAlpha = options.opacity;
|
||||||
ctx.globalAlpha = options.opacity;
|
|
||||||
}
|
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user