refacto: added saveLayers parameter#1219
refacto: added saveLayers parameter#1219ibrierley merged 2 commits intofleaflet:masterfrom TesteurManiak:issues/fix-1217
Conversation
- Added saveLayers parameter to PolylineLayerOptions & PolylinePainter to enable or disable calls to canvas.saveLayer & canvas.restore - Replaced calls to path.lineTo by path.addPolygon in PolylinePainter._paintLine
|
Just thinking, I note the polygon layer also does a saveLayer...worth us doing the same there for consistency ? |
|
It depends, in my opinion you won't have the same performance issues with polygons as, most of the time, you will draw less polygons than polylines and you might need more often to manage opacity or gradients on polygons. |
ibrierley
left a comment
There was a problem hiding this comment.
Tests fine for me...only thing I think would be an extra useful bit, is a comment to explain why someone would turn it on...eg turn this on if you get unwanted darker lines where they overlap, but there will be a performance hit.
|
Yeah this is a good idea, I'm adding it. |
|
I'll see what I can do to add this to the new documentation :) |
|
All good for me, fine for me to merge @JaffaKetchup or wanted to do some further testing ? |
|
Its ok for you to merge if you're happy |
Solve #1217
falseas advised in ibrierley's comment)