metafizzy / flickity

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

carousel-cell not animated properly when using flickity reposition #1256

Closed khoiruddin-ms closed 1 year ago

khoiruddin-ms commented 1 year ago

I tried to merging "Static select" and "flickity reposition" to add condition when cell clicked, it marked as cell-active and reposition the cell to adjust is-selected size but it won't animated/transitioned properly (using static animation instead)

i tried to use transition on css (transition : 1s all) on is-selected but instead having weird animation instead.

Test case: https://codepen.io/khoiruddin-ms/pen/wvXqKpX

is there any method to animate reposition properly?

desandro commented 1 year ago

Thanks for the test case. If you want to go to a slide immediately, use the isInstant argument with selectCell

flkty.selectCell( value, isWrapped, isInstant )

See CodePen