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

Update L.Polyline's _pxBounds when their stroke weight changes #6516

Merged
merged 1 commit into from Feb 20, 2019

Conversation

IvanSanchez
Copy link
Member

Fixes #6514

Copy link

@Jadaw1n Jadaw1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, thanks for the quick fix!

@mourner mourner merged commit 13f649d into master Feb 20, 2019
@mourner mourner deleted the polyline-update-bounds branch February 20, 2019 15:39
@NielsHolt
Copy link
Contributor

Hi
In version 1.5 Path.setStyle now calls this._updateBounds() if stroke is set in options
But it fails it setStyle is called before the path is added to the map
this._updateBounds using _rawPxBounds witch isn't set before _project is called

I think that the fix is to call this._project() instead of this._updateBounds() in setStyle

@t-sch
Copy link

t-sch commented May 23, 2019

I have a similar problem with Path.setStyle in a chart created with the leaflet-dvf addin. Here _updateBounds() isn't defined, too.
Probably not every L.Path derivate has _updateBounds() defined. I suggest at least a check before the call.

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

Successfully merging this pull request may close these issues.

Canvas mouseover issue with line weight on horizontal and vertical lines
5 participants