Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recalculate Speed when children change #61

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

sj3-at-roke
Copy link
Contributor

@sj3-at-roke sj3-at-roke commented Apr 20, 2023

I believe this fixes:
#9
and
#18

calculate width was only calculated on first render, and so change in the width of the children (for example, if the number of items in an array that is mapped into the <Marquee/> changes) caused the items to move far too fast or slow.

I believe this also may fix the issue where there is a large gap between the last item and the next repeat of the first item.
It does not fix this issue.

@justin-chu

@justin-chu
Copy link
Owner

I don't believe this will solve those issues since it doesn't seem like they're updating the children. However, this is still a good addition for dynamic content. Thanks!

@justin-chu justin-chu merged commit 06b1e48 into justin-chu:master Apr 22, 2023
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.

2 participants