vitalii-andriiovskyi / ngx-owl-carousel-o

owl-carousel for Angular >=6
MIT License
177 stars 51 forks source link

carousel items gets shrinked or expand in prod. build. #214

Closed Gauravdarkslayer closed 2 years ago

Gauravdarkslayer commented 2 years ago

Hello @vitalii-andriiovskyi , I am using ngx-owl-carousel-o ^7.0.1 with angular version 13.1.2 The carousel works absolutely fine in the local server but after production build, it behaves very abnormally. This is the expected output image

image(Sometimes after a refresh items get collapsed)

image (And here it expands after a refresh)

These cases are random

actually the width of .owl-item becomes 574px in image 3 and 74px in image 2.

let me know if more details are needed. Thank you

vitalii-andriiovskyi commented 2 years ago

@Gauravdarkslayer

It looks like you define the width of every slide dynamicly and use the option autoWidth. I think you should check how the width of slides gets calculated.

To find the solution, I need more details, to be able to reproduce your issue.

Gauravdarkslayer commented 2 years ago

@vitalii-andriiovskyi Yeah that totally works fine, after adding autoWidth: true and that @Input property with fixed width. Thanks for a quick response.