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
Fix Path.setStyle bug (replacing #6671) #6941
Conversation
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.
This looks good, but I agree it would nice to have a unit test to make sure we don't regress in future.
Hi @mourner and @IvanSanchez |
Hi guys, are there any updates on merging this? |
Hi @mourner and @IvanSanchez Kind regards |
|
Add unit test for Path weight set error
Simplify Polyline weight set test case
The error only occurs with the following order:
The description in #6662 does not seem to be correct, because no error occurs if |
But it is not about description only, as there is code in steps to reproduce section: var polyline = L.polyline([[45.51, -122.68],[37.77, -122.43],[34.04, -118.2]]);
polyline.setStyle({color: 'red', weight: 4});
polyline.addTo(map); And I do not see any problem even if I call |
So I am able to see that only #6664 issue is relevant, and there described slightly different case:
Ok, then I have more questions:
|
5 vector overlays extend
A possible fix without touching
The alternative fix linked above only changes the offending code-path, making less impact in other use cases. @johnd0e @NielsHolt Could you please review this alternative fix? Edit: added info about Polygon, Rectangle and Circle. |
I still doubt that it makes sense to project empty polyline. if (!this._rawPxBounds) { return; } |
This solution makes more sense @johnd0e, I have updated my branch, waiting for @NielsHolt to pull it into his branch, so it will be available in this PR. |
Alternative fix for setting weight after empty Polyline or Polygon is added to the map
Hi |
@johnd0e do you think this is ready to be merged? |
Waiting for FCOO#4 |
Minor refactoring of tests
What's the next step? @johnd0e |
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.
It is ready for merge, so waiting @mourner or @IvanSanchez.
Is there any due date for this issue? |
This is a new PR replacing #6671
Fix issue #6662 and #6664