-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
refacto: added saveLayers parameter #1219
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
false
as advised in ibrierley's comment)