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

Fix: When using the animation feature of the ScrollArea, it does not move to the correct location. #5290

Closed
wants to merge 2 commits into from

Conversation

rustbasic
Copy link
Contributor

@rustbasic rustbasic commented Oct 20, 2024

Fix: When using the animation feature of the ScrollArea, it does not move to the correct location.

There is a part that is interfering incorrectly during the animation process.

Copy link

Preview available at https://egui-pr-preview.github.io/pr/5290-patch141
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@rustbasic rustbasic closed this Oct 20, 2024
@lucasmerlin
Copy link
Collaborator

But this would mean that if a scroll animation is in progress and the user clicks e.g. a scroll top button that would just not register. I think the current behaviour, while not ideal, is definitely more correct than with your changes.

You can also see it in the web demo. I put the scroll animation duration to 1s to make it easy to see.
With master if I quickly click scroll down and then scroll up while it hasn't completed the animation yet it will scroll back up:

Bildschirmaufnahme.2024-10-20.um.16.57.49.mov

With your changes it will not scroll back up:

Bildschirmaufnahme.2024-10-20.um.16.58.45.mov

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.

When moving with the animation function of ScrollArea, it does not move to the exact location.
2 participants