metafizzy / flickity

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

Is it possible to stop freescroll exactly on one cell ? #860

Closed thebat98 closed 6 years ago

thebat98 commented 6 years ago

Hi,

I'm using this plugin on many carousels and one of them has freeScroll and wrapAround options. I would have to know if its possible to center the carousel on one cell when scrolling stops ?

Regards, thebat

desandro commented 6 years ago

I would have to know if its possible to center the carousel on one cell when scrolling stops ?

If you want to center the carousel on a cell, then you do not want freeScroll to be enabled.

Another solution is to select a cell on settle

thebat98 commented 6 years ago

Hi !

Thanks for you answer. I want to use freeScroll for the speed and I also want to center the end cell.

I've tried to use "select" a cell on "settle" but its create an infinity loop...

Regards, thebat

thebat98 commented 6 years ago

Hi,

Sorry but why did you close this issue ?

Regards, thebat

desandro commented 6 years ago

I've provided my best answer to your question. But the behavior you're looking for is not explicitly supported in Flickity. So that's about it.