darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

dragging #231

Open voltmn opened 8 years ago

voltmn commented 8 years ago

Hi darsain, thanks a lot for this useful lib!

I'm using it on my website and it works great, but i got one issue about dragging with forceCentered & activateMiddle:

If you turn releaseSwing to false (because I want to slide per item) you'll need to drag item too much (about a half of item) before it will change to the next one. I saw that you added the dragThreshold, but it's only for drag event, but not for the item sliding. How can I make sly to be more responsive?

I tried to make it by myself but stuck in getRelatives function: I change a center Item condition to slideePos <= items[i].center (without a half) but it work only for next item but not for the previous one.