metafizzy / flickity

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

Scrolling cells one by one #547

Closed dangelion closed 7 years ago

dangelion commented 7 years ago

Hi, I need to show 5 cells in the initial state, then to scroll them one by one. Here is: http://codepen.io/anon/pen/ZKLMKY

But the last 4 scroll are useless. Infact you can see 4 more dot that are not needed. There's a way to solve this or is it a bug?

Thanks

desandro commented 7 years ago

I recommend you use groupCells for this use case.

See demo http://codepen.io/desandro/pen/72832e480689a8d535dc7fa031f6fd5f/

dangelion commented 7 years ago

Hi @desandro yes I know that with groupCells works well but I need to scroll the cells one by one. So I deduce that there is no way to do that, now?

desandro commented 7 years ago

need to scroll the cells one by one

Then you'll have to disable contain, so that each cell has its own unique position.

See https://github.com/metafizzy/flickity/issues/135#issuecomment-100894043 for why contain works this way.

dangelion commented 7 years ago

Ok but the last 4 dots/scroll are useless again because I already see the last cell without scroll the last 4 dots: http://codepen.io/anon/pen/MmoJYJ

desandro commented 7 years ago

I've discussed this topic elsewhere. See https://github.com/metafizzy/flickity/issues/177#issuecomment-117680694 and https://github.com/metafizzy/flickity/issues/289#issuecomment-157488885

The dots are not useless because different cells need to be selectable for accessibility.

koalabear974 commented 4 years ago

Hey ! Still have the same problem. Can't find a way to have a group selection that can scroll one cell by one cell :/