paytonshaltis / freighter

🚂 Freighter is a highly-customizable HTML carousel library featuring a number of dynamic properties affecting carousel items and transitions. Most prominently, it gives complete control over the resizing method (for responsive layouts) as well as the wrapping method (for content display).
https://paytonshaltis.github.io/freighter
MIT License
1 stars 0 forks source link

Adds resize observer to direct parent. Demo includes resizable section. #23

Closed paytonshaltis closed 1 year ago

paytonshaltis commented 1 year ago

Closes #20.

Simple fix; replaces resize event listener with a ResizeObserver object on the direct parent of the carousel. Even carousels without any 'real' parent element (only within ) will resize with the resizing.