-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
suggested change to "swipe" recognizer #640
Comments
+1 |
Could you create a PR for these changes? |
I am so sorry to bother you, but you are the experts and I have been http://rickmaxwell.apphb.com/#!work I do have hammer working on my website build, but when tabbing to another Oddly, the first carousel in the WORKS catagory works perfectly, but the Does hammer.js ver 1, support multiple carousels in separate tab-pane I am eternally grateful. Thank you and njoy! Tosca Ragnini http://www.toscatech.net%20 www.toscatech.net On Tue, Aug 12, 2014 at 4:55 AM, Jorik Tangelder notifications@github.com
|
Sure i'll create a PR for this next week! |
+1 |
+1 |
+1 Glad to see this addressed in PR #669, it makes it difficult to recognize aborted pans/swipes as well (eg, user swipes a carousel left, but then starts to swipe right before releasing... normally you could compare direction and offsetDirection, but a momentary hesitation causes direction == none) |
I just tried PR #669 and get much better results on iOS.
p.s. and many many thanks for providing hammer. |
The current implementation make swiping almost unusable on Desktops. PR #669 fixes the issue |
Closing in favor of #806 |
Hello,
after upgrading to hammer v2 we noticed some inconsistencies in swipe detection:
for swipe to be triggered in v2 the velocity and direction are calculated from the last interval. so if you swipe but keep your finger on screen for a few milliseconds, velocity drops and direction may even be 'none'. this wasn't the case in v1, I haven't checked the code but the swipe listener was definitely more sensitive.
we've noticed that "swipe" is commonly (expected to be) triggered even after holding the finger down for some time after a swipe interaction, and this seems to be missed in v2.
we tried to override the velocity issue by using a negative velocity value, which unfortunately forces the swipe detection to disregard velocity all together but it's something that we can live with.
however to fix the direction "none" issue (or even wrong dimension if you slightly move your finger in any other direction while holding) we had to override the attrTest and emit functions of the swipe recognizer to use the offsetDirection value instead of the direction one. unfortunately this means we'll miss any updates to the swipe recognizer unless we compare and add them to our own overrides. it would be great if you cared to integrate this into the master hammer.js!
tnx!
The text was updated successfully, but these errors were encountered: