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 auto_bounds when only one axis has restricted navigation #3171

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

KoffeinFlummi
Copy link
Contributor

This fixes an issue with plots where the auto-bounds feature for the y-axis would not work if navigation in the y-axis was restricted, but moving the x-axis was allowed. Any dragging or scrolling would lead to the auto-bounding being disabled, meaning the y-axis was not rescaled when new data came into view.

If that explanation makes no sense:

before: https://i.imgur.com/2bwRFNr.mp4
after: https://i.imgur.com/5TtD9fp.mp4

The solution is to only consider an axis to be modified if modifying that axis is actually allowed.

@emilk emilk added the egui_plot Related to egui_plot label Aug 9, 2023
@emilk
Copy link
Owner

emilk commented Aug 9, 2023

Makes sense!

Though your links are broken. You can just drag-drop mp4 videos into a GitHub PR description next time

@emilk emilk merged commit d483ac4 into emilk:master Aug 9, 2023
17 of 19 checks passed
@KoffeinFlummi KoffeinFlummi deleted the auto-bounds-fix branch August 9, 2023 13:14
@KoffeinFlummi
Copy link
Contributor Author

Thanks for merging.

Though your links are broken. You can just drag-drop mp4 videos into a GitHub PR description next time

Yeah, looks like those links expired. I'll keep that in mind for next time.

@emilk emilk added the egui label Aug 9, 2023
@emilk emilk removed the egui label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui_plot Related to egui_plot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants