Skip to content

Conversation

@olzraiti
Copy link

@olzraiti olzraiti commented Oct 16, 2020

Currently if you edit a polyline, the measurements don't update until you stop editing. The polygon edges update during editing, so this PR makes the plugin more consistent since the polyline behaves more like polygons.

You can reproduce the current behaviour by:

  1. going to the demo page https://prominentedge.com/leaflet-measure-path/
  2. Making the polyline editable by entering to console map._layers[39].enableEdit()
  3. Dragging the polyline corners doesn't update the polyline measurements

EDIT: Polygon doesn't update actually properly when editing, but rectangle does. I'll apply the fix for polygon also.
EDIT2: Polygon fixed now also

@juliogontor
Copy link

It works very well

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.

2 participants