stephband / jquery.event.swipe

jQuery custom events swipeleft, swiperight, swipeup and swipedown
stephband.info/jquery.event.swipe
446 stars 180 forks source link

Avoid "threshold" #40

Open Draeli opened 6 years ago

Draeli commented 6 years ago

I need to be able to trigger several swipe, which bothers me in the current approach of the "threshold" (it is also applicable to the "sensivity") is that it is not possible to have 1 value per instance of "swipe" and if I have to do it on my side, it makes the code very complex for something that could be solved more simply. Indeed, in my opinion, it would be simpler to trigger systematically but by adding this parameters and let the callback decide what to do with it. The other approach would of course be to create instances of swipe to have a specific setting.

Another idea: currently the "threshold" uses a relative value, it would be interesting to be able to use values with unit (px / em / rem / vw / ...).