Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Prevent double snap doesn't work #50

Open
sickrandir opened this issue Feb 14, 2018 · 1 comment
Open

Prevent double snap doesn't work #50

sickrandir opened this issue Feb 14, 2018 · 1 comment

Comments

@sickrandir
Copy link

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

@joelmukuthu
Copy link
Owner

joelmukuthu commented Feb 14, 2018

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?

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

No branches or pull requests

2 participants