metafizzy / flickity

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

How to end the last carousel-cell on right side when carousel-cell center align #1093

Closed Naren-hybreeder closed 3 years ago

Naren-hybreeder commented 4 years ago

Hi,

I found one question on Stack Overflow (https://stackoverflow.com/questions/63372561/how-to-end-the-cell-till-right-arrow)

This is not an issue but i just want to know it is possible or not.

I am displaying slider with cellAlign: 'center' and it's working but at the end of the carousel-cell I don't want to give the space. I have to end the slider.

This is my slider when I load the page which is correct gXNJL

and my slider end like this as per documentation WFGA5

But I want to end like this. Is it possible? ik2n8

vittorius commented 4 years ago

contain: true ?

Naren-hybreeder commented 4 years ago

Hi @vittorius , Thanks for the reply.

I tried to contain: true but the first cell is also starting from the arrow.

Below is the screenshot after using contain: true. I have to start in the first cell in the middle (screenshot in the question)and end it at the end (screenshot in the question). Screenshot 2020-09-02 at 6 07 26 PM

vittorius commented 4 years ago

If the combination of cellAlign: 'center' and contain: true doesn't give the desired outcome, I'm out of (immediate) ideas 😞

Naren-hybreeder commented 4 years ago

@vittorius , Yes, it's not giving my designer output. You can also try my code which i uploaded on Stack overflow.

desandro commented 3 years ago

As @vittorius has addressed, you can align the last cell to the right edge with contain: true, but this will also align the first cell to the left edge as well. There is no option to align the first cell in the center and last cell at the right edge.

Naren-hybreeder commented 3 years ago

So there is no option to get my expected output if I use flickity. right?

desandro commented 3 years ago

So there is no option to get my expected output if I use flickity. right?

Right.