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

Add wrapping scroll. #4

Closed paytonshaltis closed 1 year ago

paytonshaltis commented 1 year ago

Closes #3.

Carousels of any size, any number of visible items, and any number of items to scroll by will now use wrapping scroll properly for both left and right navigation.

Note that the duplication of HTML elements in this PR means that carousels with fewer items than need to be generated at a time (visible + scroll amount) will be duplicated. This means that elements inside the carousels may have the same IDs.