metafizzy / flickity-docs

:memo: documentation for Flickity
28 stars 8 forks source link

Slide on scroll #9

Closed andreacavattoni closed 9 years ago

andreacavattoni commented 9 years ago

Hi, and thank you for your job. I'm having a really annoying problem with the plugin and mobile.

Basically i have a full page slider that takes half of the window height, when i try to scroll the slider start flikering and the page scroll is really unstable.

So i suggest this modification at the code: before move the slide ondrag check if the Y is greather than the X so we will be able to understand the user intention. If the Y is greather than the X the user is traing to scroll so we wont activate the slide!

Here a snippet from the minified version:

if(Math.abs(o.x) < Math.abs(o.y)){ // IF THE USER WANT TO SCROLL return false; }else{ // IF THE USER WANT TO SLIDE return !this.isDragging && this.hasDragStarted(o) && this._dragStart(t, e), o }

Hope it helps, sorry for the bad english btw ;)

desandro commented 9 years ago

Thank you for this feature request. Sounds like metafizzy/flickity#67. Closing as a duplicate.