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

Calculate rotation correctly when pointers change order #1136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crabmusket
Copy link

This fixes #791 by always calculating rotation by considering pointers in order of their identifier. A couple of PRs seem to be replacing the + with - (eg #939) so I did that too. end - start is a pretty common convention for diffs.

In case anyone would like to use or test this before it's merged or released, I've made a branch with the compiled assets. Just add this to package.json:

"dependencies": {
  "hammerjs": "git://github.com/crabmusket/hammer.js#fixed-791"
}

Fix hammerjs#791 by always calculating rotation by considering pointers in order of their identifier. This catches edge cases where pointers change order in the array during a gesture.
@squadette
Copy link

squadette commented Aug 26, 2019

This has been partially fixed in proposed 2.1.0: squadette#1

However I think that this PR also needs to be applied to consider different pointers order.

Thank you,

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.

Rotation appears to rely on non-standard Touchlist ordering consistency
2 participants