FormidableLabs/nuka-carousel

Carousel does not work with varying width slides

vzsoares opened this issue · 1 comments

Bugs and Questions

Describe Your Environment

  • What version of nuka-carousel are you using? 7.0.0
  • What version of React are you using? 18.2.0
  • What browser are you using? chrome 120.0.6099.129

Describe the Problem

Carousel does not work with varying width slides, it can't navigate properly:

issue

it increases the current slide but it doesn't show it

Expected behavior:

It should work properly (:

Actual behavior

It can't navigate properly

Additional Information

I saw the code, and it assumes the width will be the same; so this might be a big change;
The offset calculations should probably find the boundingRect of the slide child nodes and use that for reference

important prop is slideWidth="auto"
and the varying size images

codesandbox

Released in v8