Commit f70ac43
authored
Fix no auto_bounds preventing pan/zoom/scroll (#218)
The previous logic would force reset the bounds for an axis if its
auto_bounds was false. I believe that the behavior of mem.auto_bounds
already sufficiently achieves the intended behavior here.
Scenarios tested:
- User can pan/zoom/scroll with auto_bounds true/false
- Double-click resets auto_bounds the plot (regardless of
default_auto_bounds setting)
- Plot bounds are updated when plot data changes after double-clicking
- User can still interact with the plot (pan/zoom/scroll) after
double-clicking
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui_plot/blob/master/CONTRIBUTING.md)
before opening a Pull Request!
* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo f or a new
example.
* Do NOT open PR:s from your `master` or `main` branch, as that makes it
hard for maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.
Please be patient! We will review your PR, but our time is limited!
-->
* Closes #151
* [x] I have followed the instructions in the PR template1 parent ac2d7cb commit f70ac43
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
980 | | - | |
981 | 980 | | |
982 | 981 | | |
983 | 982 | | |
| |||
1006 | 1005 | | |
1007 | 1006 | | |
1008 | 1007 | | |
1009 | | - | |
1010 | | - | |
| 1008 | + | |
| 1009 | + | |
1011 | 1010 | | |
1012 | 1011 | | |
1013 | | - | |
| 1012 | + | |
1014 | 1013 | | |
1015 | 1014 | | |
1016 | 1015 | | |
| |||
0 commit comments