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

'moveend' fires during multi-touch gesture input #3435

Closed
kristfal opened this issue Oct 21, 2016 · 2 comments
Closed

'moveend' fires during multi-touch gesture input #3435

kristfal opened this issue Oct 21, 2016 · 2 comments

Comments

@kristfal
Copy link

Issue

The moveend event behaves differently during single-touch and multi-touch input.

During single touch, the moveend event is fired when the gesture finishes (finger is no longer touching the screen). During multi-touch, eg. two fingers touching the screen at the same time, moveend is fired on every single animation frame for the duration of the gesture.

mapbox-gl-js version: Master

Steps to Trigger Behavior

  1. Bind an event listener to 'moveend'
  2. Two finger rotate / pinch on a mobile device
  3. The event listener will now fire during the pinch / rotate gesture

Expected Behavior

'moveend' fires when user gesture is finished and any optional inertia have stopped playing during both multi-touch and single-touch gestures.

Actual Behavior

'moveend' fires constantly during multi-touch user gestures and at the end of single-touch gestures.

Tested in iOS10 Safari and Android Chrome.

Kinda related to #1104

@kristfal kristfal changed the title 'moveend' fires on every multi touch input gesture 'moveend' fires during multi-touch gesture input Oct 21, 2016
@lucaswoj
Copy link
Contributor

This is effectively a duplicate of #3357. "move" has to do with Camera state changes, not necessarily interaction handler state changes.

@lucaswoj
Copy link
Contributor

Added a bullet point to #3357 to explicitly capture the essence of this ticket

prevent interaction handlers with inertia from firing multiple moveend events within an individual interaction

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

3 participants