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 bug allowing camera easings to be stopped with a click on a non-interactive map #3150

Closed
averas opened this issue Sep 6, 2016 · 4 comments

Comments

@averas
Copy link
Contributor

averas commented Sep 6, 2016

mapbox-gl-js v0.23.0:

Steps to Trigger Behavior

  1. Create a non-interactive map (interactive: false)
  2. Initiate an animated transition, for example with flyTo
  3. Click on the map during the transition

Demo: http://codepen.io/anon/pen/xEbZQm

Expected Behavior

That the map does not react to the mouse click.

Actual Behavior

The transition is aborted.

@lucaswoj lucaswoj changed the title Non-interactive map can be interacted with during transitions Fix bug allowing camera easings to be stopped with a click on a non-interactive map Sep 6, 2016
@averas
Copy link
Contributor Author

averas commented Sep 8, 2016

@mourner
Copy link
Member

mourner commented Sep 8, 2016

@averas a more general question is should we just not add any of these event handlers if interactive is false?

@averas
Copy link
Contributor Author

averas commented Sep 8, 2016

@mourner I thought of that as well and it might be that some of them could be completely removed if the map is in non-interactive mode. But I can imagine scenarios where you still want the mouse/touch events fired for other programmatic actions to take place. Say that you want the map to be completely non-interactive, but you still want to be able to have your application act on clicks on it.

@mourner
Copy link
Member

mourner commented Sep 8, 2016

@averas yeah, sounds fair. We'll welcome a PR with a fix then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants