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

Call $sope.$apply() after user initiated onpopupclose event #5

Open
alex-pl opened this issue Sep 22, 2015 · 3 comments
Open

Call $sope.$apply() after user initiated onpopupclose event #5

alex-pl opened this issue Sep 22, 2015 · 3 comments

Comments

@alex-pl
Copy link
Member

alex-pl commented Sep 22, 2015

Call $sope.$apply() at the end of a user initiated (here: only when the user has clicked on the x inside the popup) onpopupclose event.

Currently the user selection in the sidebar does not get removed when a user closes the pop up this way. This is because the scope doesn't get updated in that case.

@MichaelKohler
Copy link
Member

I didn't check the code, but $scope.$apply() is the last resort if two-way-binding doesn't work. just my 2 cents

@alex-pl
Copy link
Member Author

alex-pl commented Sep 22, 2015

Yes you're right, but in this case it's necessary because the pop up and it's event comes from the Mapbox/Leaflet code which is not connected to Angular.
It's only the single case when the user closes the pop up by clicking the small "x" button.

@MichaelKohler
Copy link
Member

Go ahead :)

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

No branches or pull requests

2 participants