Skip to content

Conversation

@liamegan
Copy link
Member

Description

The carousel was having issues maintaining a consistent speed with different numbers of items.

Solution

Updating the calculation for the carousel speed.

This ensures that the carousel runs at a constant speed, regardless of the number of items in the carousel. The speed is calculated based on the total width of the items in the carousel and the desired speed in pixels per second.

Added a padding parameter, which allows the user to specify the amount of space to be added to the animation in order to ensure that the items are not cut off at the edges of the carousel.

This ensures that the carousel runs at a constant speed, regardless of
the number of items in the carousel. The speed is calculated based on the
total width of the items in the carousel and the desired speed in pixels
per second.

Added a padding parameter, which allows the user to specify the amount of space
to be added to the animation in order to ensure that the items are not cut off
at the edges of the carousel.
@liamegan liamegan requested a review from andrewrubin March 30, 2025 20:35
@liamegan liamegan requested a review from marlonmarcello March 30, 2025 20:38
Copy link
Member

@andrewrubin andrewrubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @liamegan! Can we please update the docs accordingly before merging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants