angular-snapscroll
angular-snapscroll copied to clipboard
Prevent double snap doesn't work
Hi, I'm trying to use angular-snapscroll in my project however I noticed that I get a nasty double snap on my laptop using the touchpad. It doesn't happen at the first snap but it happens later if I make a fast and strong snap (even not really that strong). I tried to debug it and it seems that the component is already snapping twice when the part of the code that should prevent the double snap gets triggered. I observed the same behaviour also on the demo website: http://joelmukuthu.github.io/angular-snapscroll How can I possibly implement a workaround? thanx
Hi there,
You can get around that by increasing the prevent-double-snap-delay
, though I think the current 1 second delay is sufficient in most cases.
Note that passing false
as the value for prevent-double-snap-delay
does not disable that double-snap, but rather it disables this feature that tries to work around the double snap. I think that's a bit unclear in the docs. Basically the double-snapping is unfortunately something we have to live with since this module listens on the native wheel events
EDIT:
I tried to debug it and it seems that the component is already snapping twice when the part of the code that should prevent the double snap gets triggered.
I'm a bit rusty on the code for this module, could you point me to that part of the code?