dashArray Path layer property is contagious in canvas #5182

definiteIymaybe opened this Issue Dec 10, 2016 · 0 comments


None yet

2 participants

  • I'm reporting a bug, not asking for help
  • I've looked at the documentation to make sure the behaviour is documented and expected
  • I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
  • I've searched through the issues to make sure it's not yet reported

How to reproduce

  • Leaflet version I'm using: 1.0.2
  • Browser (with version) I'm using: Chrome, Safari, FF
  • OS/Platform (with version) I'm using: OSX 10.12

What behaviour I'm expecting and which behaviour I'm seeing

Specifying dashArray style property for one of Path layers leads to all other layers inheriting it. Specifying a different dashArray value for other layers does not solve it. Other stroke properties (e.g. color) do not suffer from this issue.

This only concerns canvas renderer, removing 'preferCanvas: true' results in correct stroke rendering.

Codepen: https://codepen.io/definitelymaybe/pen/dOjdez

@perliedman perliedman added the bug label Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment