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 custom transitions. #25

Closed paytonshaltis closed 1 year ago

paytonshaltis commented 1 year ago

Closes #21.

The user can now configure the following attributes on each carousel:

Because the cubic-bezier() transition functions have the possibility of rolling backward or forwards, if it is detected that one of these transitions is being used, a deep copy of the appropriate items will be used instead of a dummy value. Note that it will not add extra items (as of now), so the user still needs to make sure that it doesn't scroll past the elements.

Fixes a small issue with trying to resize while an animation is playing. Now, the items don't change the size, and the carousel container and items are resized as soon as the transition is over.