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

Fix error if using shapeAt within line boundaries but outside of tolerance #174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Sep 12, 2018

The delete-shape example has been updated to show the error.

To recreate, remove the fix in Leaflet.Editable.js and then ctrl+click within the rectangular bounds of a line but outside of the click tolerance area.

Error would then be:

Leaflet.Editable.js:1825 Uncaught TypeError: Cannot read property 'length' of undefined
    at e.isInLatLngs (Leaflet.Editable.js:1825)
    at e.shapeAt (Leaflet.Editable.js:1811)
    at delete-shape.html:89

leaflet _projectLatlngs method expects that the latlngs supplied are only ever an array, not a LatLng object.

Johnathon Harris added 2 commits September 12, 2018 11:24
Fixes an error which occurs in the delete-shape example upon ctrl+click
within the bounding box of a path but outside of the tolerance.
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.

None yet

0 participants