Closed elbamos closed 5 years ago
I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.
I'm having the same problem..
cellAlign: 'center'
works as if cellAlign is set to left
In our app, the user can add and remove cells from the carousel, which starts empty. We do this by calling
append
(orprepend
orinsert
, depending on how many cells are in the carousel), and then callingselectCell
, and thenreposition
.The behavior we'd like is for the currently selected cell to always be in the center of the screen, even when there aren't enough cells to fill the screen width.
The behavior we're seeing with
cellAlign: center
andwrapAround: true
is that when the first cell is added, its properly centered. When the second cell is added, the cells move to be flush right, and the rightmost cell is selected. When the third cell is added, the cells are still flush right, but the newly added, selected cell is halfway cut-off by the edge of the window. After there are enough cells to fill the width of the screen, then the correct behavior begins.How can we get the desired behavior with fewer cells than fill the screen? Thanks.