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

Slow scrolling desktop mouse events marked as inertial #14

Open
renarsvilnis opened this issue Feb 10, 2017 · 2 comments
Open

Slow scrolling desktop mouse events marked as inertial #14

renarsvilnis opened this issue Feb 10, 2017 · 2 comments

Comments

@renarsvilnis
Copy link

Hi, I came across an issue when using default settings and desktop mouse. If I scroll slowly on with mouse wheel, these events are marked as inertial.

Even if I switch scroll direction to opposite, it continues to be detected as inertial (lethargy.check(ev) === false).

p.s.
I'm using a modified version of the jsfiddle demo from README.md. I added lethargy with default settings and differentiate inertial events by coloring them red and normal events as gray.

screen shot 2017-02-10 at 06 06 53

@d4nyll
Copy link
Owner

d4nyll commented Feb 10, 2017

Hi @renarsvilnis thank you very much for sharing your experience. I am not sure I understand you 100%, so I'll provide multiple responses, let me know if I hit the mark with any of them.

  1. Lethargy aims to fire scroll intents, which means for a single slow scroll, it should only fire one intent at the beginning. See the screenshot below of my desktop mouse (red is normal, gray is inertial here)
    slow-scroll
    I can't see clearly whether this is the case from your screenshot. If it is, then that's intended behaviour.
  2. Your desktop mouse has two different delta values, which I have not encountered before. You might want to try a large tolerance value (e.g. 1). If you expect your users to scroll quickly and want to register each one as an intent, you might want to try a low delay value (e.g. 50). For example, your options might look like const lethargy = new Lethargy(6,100,1,50);. See this jsFiddle.
  3. I would be very grateful if you can play around with the variables and let me know if any of them works for you. I only have a limited set of devices to test with. You can find explanation of the variables in the comments in the code

@MeRahulAhire
Copy link

download

@d4nyll If I scroll with force on my mousewheel it gets scrolled in opposite direction which is something you can see on the right half of this image. On trackpad its working fine (left half). Any suggestion on how to improve it?

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

No branches or pull requests

3 participants