metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.55k stars 601 forks source link

Flickity Sync fail while freeScrolling #604

Open nussecke opened 7 years ago

nussecke commented 7 years ago

So i have two slider, which are working.

The first slider serves as "navigaton", the second slider is a "freescroll"-Slider.

When the second slider is scrolling in freescroll and i select a navigation element on top of the "freescroll slide" nothing happens. It just works when the "freescroll slider" settled.

How can it be done, if the free scroll slider is still sliding, and i click at a navigation slider element, that it will synchronize?

Here my Example: https://jsfiddle.net/mo423bxj/4/

desandro commented 7 years ago

Thanks for reporting this issue. This is indeed a bug. I'll have to look into resolving it.

gingersoulrecords commented 7 years ago

I was just about to post the same bug, I think - where draggable is required for AsNavFor, but doesn't seem to sync up if the AsNavFor carousel is 'thrown' to a particular cell.

I usually solve this by firing a function to check slide indexes after settle to see if they're the same; if not, sync them with a select.

nussecke commented 7 years ago

Thank you for having a look @desandro !

Hi @gingersoulrecords, I have tried your approach and it worked, but it doesn't fit the use case for my sliders, because the timing when my second slider settles is much longer than the first slider (due to the bigger width of my second free slider).

When I activate pageDots and do a free slide, and click on a dot, both sliders a synchrnous. I have tried to trigger the pageDots (on click of slider one, while slider two is free sliding) but no success.

--- Edit So until the Bugfix, i have solved it by not allowing to click the navigation slider, until the freescroll slider settled.

hihahihahoho commented 5 years ago

Bump Is there any other workaround?