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 Translate and Modify interactions #5479

Merged
merged 1 commit into from Feb 3, 2020
Merged

Conversation

adube
Copy link
Contributor

@adube adube commented Feb 1, 2020

Fix bug with Translate and Modify interactions in ngeo (regression introduced by: d207fc7)

In the setState methods of these interactions, both the map and active properties are checked to unregister events. An extra check was made for the map, and when falsy the method did nothing, while it had to (unregister events). The cause was that upon selecting a feature in the draw tool, new events were incrementing and the clicked features was being "selected" 1 extra time everytime, cummulatively.

This fixes this issue.

Also, I don't understand how it can be possible the the interactions and listenerKeys properties can be undefined when the method is called since they are initialized in the constructor, but they can! The extra "if" takes care of that very odd issue.

@adube adube requested review from fredj and sbrunner February 1, 2020 14:59
@adube adube merged commit 3844521 into master Feb 3, 2020
@adube adube deleted the gsgmf-1204-fix-gmf-draw-move branch February 3, 2020 18:42
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