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

Improve VisualBounds2D behavior in graph view #8438

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

grtlr
Copy link
Contributor

@grtlr grtlr commented Dec 12, 2024

Related

What

This implements improved handling of VisualBounds2D. Specifically, it:

  • Always defaults to the data bounds when user has not modified the view (@nikolausWest's suggestion).
  • Zooms in and out of view when resizing the view (@abey79's suggestion).
  • Fixes the VisualBounds2D selection panel bug (submitted by @Wumpf)

@grtlr grtlr added the exclude from changelog PRs with this won't show up in CHANGELOG.md label Dec 12, 2024
Copy link

github-actions bot commented Dec 12, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
983fd17 https://rerun.io/viewer/pr/8438 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good. Waiting for web demo to build so I Can try it out :)

crates/viewer/re_view_graph/src/view.rs Outdated Show resolved Hide resolved
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there seems to be some kind of minimum zoom? (didn't dig into the code enough to spot it)
If I make change visual bounds to be very small it doesn't zoom in further. Surely pre-existing behavior that was added intentionally, but I find it a bit odd

@grtlr
Copy link
Contributor Author

grtlr commented Dec 12, 2024

Yes, that's a limitation of egui—you can't zoom in further than 1.0. Because otherwise, text and everything would become blurry.

Co-authored-by: Andreas Reich <andreas@rerun.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fit the graph bounding box to the view unless user overrides
2 participants