Promo / wheel-indicator

Indicates when user makes swipe gesture on a trackpad or mouse wheel
http://promo.github.io/wheel-indicator/
272 stars 41 forks source link

Not working for touch screens? Tested: iOS 10, Chrome / Safari #48

Closed benjibee closed 7 years ago

benjibee commented 7 years ago

Forgive the silly question, but is this intended to also detect mobile scroll (swipe) actions?

The grammar isn't 100% clear and it's very much not working on mobile. Just wondering.

f0rmat1k commented 7 years ago

@benjibee It works only with mouse wheel. To get gesture on mobile devices you should use something like Hammer.js.

benjibee commented 7 years ago

Ok, thanks for the clarification. I find the below text to be quite ambiguous, though the list of events is not:

Generates event when user makes new movement (like a touchstart on a touchscreen)

In addition, wouldn't it be quite trivial to add touchstart and touchend support to this? It seems strange to include Hammer.js when just looking to detect scrolling / swiping up and down, IMO.

f0rmat1k commented 7 years ago

@benjibee I agree about the text. I will change it. But adding touchstart, touchend it more complicated task, than it looks like. And already there are libraries, that give it to you. The only target of wheel-indicator: to provide you imitation of touchstart on mouses and touchpades. We usually connect this library for desktop browsers and hammer.js for touch devices.