Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashArray doesn't work in canvas when it's space-separated #6277

Closed
IvanSanchez opened this issue Aug 8, 2018 · 0 comments · Fixed by #6278
Closed

dashArray doesn't work in canvas when it's space-separated #6277

IvanSanchez opened this issue Aug 8, 2018 · 0 comments · Fixed by #6278
Labels

Comments

@IvanSanchez
Copy link
Member

IvanSanchez commented Aug 8, 2018

Adding a canvas-rendered polyline/polygon with dashArray containing space-separated numbers, e.g.:

L.polyline([[0, 0], [40, 10]], {
  dashArray: "4 4",
  renderer: L.canvas()
}).addTo(map);

The line doesn't get dashes but shows solid instead.

See https://plnkr.co/edit/xHfZHNDhded1VaIdae1K?p=preview

The browser documentation for SVG dashArray specifies, emphasis mine:

a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant