CloudMade/Leaflet — Issue #441: Shapes fail to remove their stroke after .setStyle({stroke: false})
Author: thatjpk
Created: 2012-01-17 11:18:18+00:00
State: open

It appears that if you create a shape and enable stroke (either when the shape is created, or later with .setStyle()), the stroke can't be turned back off.

If a shape is created with no stroke, it renders correctly (no stroke visible). If a shape created with no stroke, then later has it's stroke enabled with .setStyle({stroke: true}), it renders correctly (a stroke visible). But if you try to turn it back off with .setStyle({stroke: false}), it renders incorrectly (the stroke remains visible).

Here's a gist of a simple example that reproduces the problem: https://gist.github.com/1626238
Tested in Chromium 15 and Firefox 9, and both exhibited this behavior.