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

SnapList was not removed after removing and adding a layer #784

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

Falke-Design
Copy link
Collaborator

The snapList was not generated new when in the pm:create event map.removeLayer(e.layer) and then map.addLayer(e.layer) was called.

The problem was, that the listener layeradd on the map was called because of removing and readding the layer in pm:create but the listener was fired AFTER drawing was disabled and _cleanupSnapping was called. So the result was, that to the drawing layer (map.pm.Draw.Rectangle._snapList) was the snapList created. And then when the drawing mode for Rectangle was enabled, it not created the snapList, because it has already one (this can be a old snapping list)

@codeofsumit codeofsumit merged commit 92a48dc into geoman-io:develop Feb 6, 2021
@Falke-Design Falke-Design deleted the throttleFixes branch March 31, 2021 11:36
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

2 participants