-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add auto_bounds/set_auto_bounds
to PlotUi
#3586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :)
@@ -854,7 +854,7 @@ impl Plot { | |||
PlotMemory::load(ui.ctx(), plot_id) | |||
} | |||
.unwrap_or_else(|| PlotMemory { | |||
auto_bounds: true.into(), | |||
auto_bounds: default_auto_bounds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was wondering about this one on the previous PR that added default_auto_bounds
. Got me, I should have commented 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the default_auto_bounds
were just renamed, so that was a pre-existing bug I believe.
66ca3bf
to
cc6f3df
Compare
auto_bounds/set_auto_bounds
to PlotUi
…in timeseries space views (#4270) ### What * Fixes #4246 * Depends on emilk/egui#3586 * Blocked on #4111 ![Export-1701442441839](https://github.com/rerun-io/rerun/assets/49431240/d02f7d64-801a-4fe4-8ec1-20524ba78bd5) ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4270) (if applicable) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4270) - [Docs preview](https://rerun.io/preview/2706326572e06cf2623136a62fee75d75b490fdd/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/2706326572e06cf2623136a62fee75d75b490fdd/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) --------- Co-authored-by: Andreas Reich <r_andreas2@web.de> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
These PR recently cleaned up the code around auto-bounds, but introduced an involuntary change whereby auto-bounds would not be enabled by default. All plots would default to being not properly centred as a result. - #3587 - #3586 This PR changes the default back to enabled. It also deprecates `auto_bounds_x()` and `auto_bounds_y()`, which could only enable auto-bounds (which is not very useful as auto-bounds were, and now are again, enabled by default). A new `auto_bounds()` API can now be sued to disable auto-bounds if needed. Fixes #3712 Fixes rerun-io/rerun#4503
These PR recently cleaned up the code around auto-bounds, but introduced an involuntary change whereby auto-bounds would not be enabled by default. All plots would default to being not properly centred as a result. - #3587 - #3586 This PR changes the default back to enabled. It also deprecates `auto_bounds_x()` and `auto_bounds_y()`, which could only enable auto-bounds (which is not very useful as auto-bounds were, and now are again, enabled by default). A new `auto_bounds()` API can now be sued to disable auto-bounds if needed. Fixes #3712 Fixes rerun-io/rerun#4503
Part 2 of 2 of adding a better API for egui_plot's auto-bounds feature.
In this PR: add
auto_bounds()
/set_auto_bounds()
APIs to PlotUI