shemetz / ZoomPanOptions

FoundryVTT module for zooming and panning better
MIT License
7 stars 8 forks source link

Auto detect touchpads #26

Closed TPNils closed 3 years ago

TPNils commented 3 years ago

Hi,

I was looking into auto detecting mouse scrolls vs touchpad scrolls. Unfortunately it does not seem to be standardized, though though testing with my own laptop (a nice big sample size of 1...) this seems to work well enough.

Not sure if you want to add a new separate auto detect mode next to the default. My idea is that the default should work the best out of the box => default = auto detect.

shemetz commented 3 years ago

Looks good to me. Thanks for the idea and the smooth implementation!

shemetz commented 3 years ago

@TPNils See #27 - causes some issues in MacOS.

TPNils commented 3 years ago

That is unfortunate... Yeah your call to separate it from default seems the right call then. I do not have a macbook where I can observe the behaviour, though it seems it is swapping between touchpad and mouse modus.

I will see if there is something that can be done about that, detecting the type and locking it in while the scroll continues (but not permanently since you can have a touchpad and mouse at the same time). I won't be able to test it, but we could ask the user who reported the issue to try the auto mode again

shemetz commented 3 years ago

My fix in #27 might be good enough - I found more code for auto detection which seems to work for a mac (at least for mine).