Fix canvas redraw when style updates fill and/or weight (#5034)

Close #5031.
This commit is contained in:
Per Liedman 2016-10-21 16:09:26 +02:00 committed by Iván Sánchez Ortega
parent fa7accacef
commit 670662e718

View File

@ -231,7 +231,7 @@ L.Canvas = L.Renderer.extend({
ctx.globalCompositeOperation = clear ? 'destination-out' : 'source-over';
if (options.fill) {
if (options.fill || clear) {
ctx.globalAlpha = clear ? 1 : options.fillOpacity;
ctx.fillStyle = options.fillColor || options.color;
ctx.fill(options.fillRule || 'evenodd');