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

Progress component rounding causes jumpy animation #313

Open
trentjones21 opened this issue Mar 26, 2024 · 2 comments
Open

Progress component rounding causes jumpy animation #313

trentjones21 opened this issue Mar 26, 2024 · 2 comments

Comments

@trentjones21
Copy link
Contributor

style={"width: #{round(@value/@max*100)}%"}

I'm animating a Progress component, and I'm wondering if it's necessary to round the width percentage of the filled in portion of the bar. This causes the animation to be extremely jumpy when going from one full percentage point to the next.

Perhaps animation is outside the intended scope of this component, but would it hurt to either remove the round function or round it to a one or two decimal places, as opposed to whole numbers?

@mplatts
Copy link
Contributor

mplatts commented Mar 26, 2024

Happy for it to be removed if it helps with performance and no negative effects. Not sure why we do it. Would you be able to do a PR?

@trentjones21
Copy link
Contributor Author

Yep! Here you go: #314

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

No branches or pull requests

2 participants