metafizzy / flickity

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

Flickity in Oxygen repeater #1219

Closed Hud1ai2 closed 2 years ago

Hud1ai2 commented 2 years ago

I have some issue with slider rendering. I'm using Oxygen builder and easy post element. Inside this element the Flickity is used as a slider for viewing the variants of products.

Snímek obrazovky 2022-05-05 073948

But as you can see, the second image has a wrong position when I move there. But when I change the size of the window of the browser, it works then (minimaze it and maximaze again). Images used in carousel aren't in same ratio. But I hope that shouldn't be a problem. So I think there is some problem with counting the size of slider's viewport itself or with the size of cell.

Thanks

Hud1ai2 commented 2 years ago

SOLVED

So it was my copy paste error. And just tweaking

  1. removing cellAlign: 'left', and contain: true from JS;
  2. removing the right: 0 from CSS for Flickity cell.