Join GitHub today
suggested change to "swipe" recognizer #640
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!
I am so sorry to bother you, but you are the experts and I have been
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!
On Tue, Aug 12, 2014 at 4:55 AM, Jorik Tangelder firstname.lastname@example.org
referenced this issue
Sep 17, 2014
+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)