robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
243 stars 31 forks source link

[Feature request] Add an accepted-cone region to the swipe gesture #12

Open rednas174 opened 2 years ago

rednas174 commented 2 years ago

When I used this library, I found that the gestures of swiping had to be fairly exact in the wanted direction. In the downloaded plugin index.js I've added a "coneSwipeWidth" option to the plugin which dictates how much a user can move in the perpendicular direction relative to the dominant swiping direction. ConeSwipeWidth_feature_request

See code attachement. If the user swipes within that cone, then the gesture is still considered to be that direction.

I've added my version as a file attachment. Line 47 and 129-132 have been added / changed

rednas174 commented 2 years ago

Sorry for the closing and re-opening

robinrodricks commented 2 years ago

Can you fork this repo and make a pull request?