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

Handlers should be aware of their enabled/disabled state. #2069

Closed
mcwhittemore opened this issue Feb 5, 2016 · 0 comments · Fixed by #2085
Closed

Handlers should be aware of their enabled/disabled state. #2069

mcwhittemore opened this issue Feb 5, 2016 · 0 comments · Fixed by #2085
Assignees

Comments

@mcwhittemore
Copy link
Contributor

Currently handlers like DoubleClickZoom are unaware of their enabled/disabled state. It is also not possible as a consumer of mapbox-gl to know this state. This makes it impossible to know if you should renable a handler that you have disabled. I think the best place to check for this is in the handler's enable function. A consumer could fake this themselves, but that will lead to some hard to debug bugs when another application or plugin is also enabled and disabling handlers.

I'm currently handling this is gl-draw by disabling before I enable.

lucaswoj pushed a commit that referenced this issue Feb 8, 2016
… in order to prevent duplicate event listeners from being bound

fixes #2069
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 a pull request may close this issue.

3 participants