Skip to content
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

Add "Flick" Gestures #96

Open
leiflm opened this issue Dec 8, 2020 · 5 comments
Open

Add "Flick" Gestures #96

leiflm opened this issue Dec 8, 2020 · 5 comments

Comments

@leiflm
Copy link
Contributor

leiflm commented Dec 8, 2020

It would be really nice, if one could enable a timing dependency for a gesture like: "unless this gesture happens within 500ms, the event is ignored by the extension/propagated.".

This would allow two-finger gestures to be used alongside two-finger scrolling, etc.

I'm willing to implement this, but would be interested, if this has already been contemplated and was rejected for some reason?

@mpiannucci
Copy link
Owner

mpiannucci commented Dec 8, 2020

Hi, there is already a setting like this I think. If you adjust the sensitivity, that will change the threshold of the gesture to be detected.

Let me know if that is not what you are looking for.

@leiflm
Copy link
Contributor Author

leiflm commented Dec 10, 2020

Hey, thanks for your quick feedback.

If you adjust the sensitivity, that will change the threshold of the gesture to be detected.

hmm.. the code (_checkActivated and _checkSwipeValid) reads like the threshold refers to the travel distance (i.e. solves #19), but does not provide a solution to the requested feature.

What I'm suggesting is implementing flicking recognition as shown here: https://vimeo.com/1933594.

@mpiannucci
Copy link
Owner

Ahhhhh Ok so you want new gestures. Got it!

@mpiannucci mpiannucci changed the title add timing requirement to the gesture recognition Add "Flick" Gestures Dec 10, 2020
@mpiannucci
Copy link
Owner

In theory, this can be implemented by piggy backing on the existing gestures and just changing the sensitivity to be really low so they trigger fast but only if there is both acceptable acceleration and the direction is perfectly horizontal or vertical

@leiflm
Copy link
Contributor Author

leiflm commented Dec 11, 2020

In theory, this can be implemented by piggy backing on the existing gestures and just changing the sensitivity to be really low so they trigger fast but only if there is both acceptable acceleration and the direction is perfectly horizontal or vertical

You'd still need timing right? I used a more general approach/title ("add timing sensitivity") so that if you add other gestures, you could have both again.

Example pinch (in/out):

  1. pinch to zoom in and out inside a pdf
  2. pinch (fingers towards one another) "quickly" to close the pdf viewer window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants