From 4b2065ffb14d7616ba25dfc2d0cbeab2363d0b87 Mon Sep 17 00:00:00 2001 From: Per Liedman Date: Fri, 21 Oct 2016 16:09:26 +0200 Subject: [PATCH] Fix canvas redraw when style updates fill and/or weight (#5034) Close #5031. --- src/layer/vector/Canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/vector/Canvas.js b/src/layer/vector/Canvas.js index fff6f79c5ca..37b5f689453 100644 --- a/src/layer/vector/Canvas.js +++ b/src/layer/vector/Canvas.js @@ -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');