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

2D view is clipping some data on the edges #1113

Open
teh-cmc opened this issue Feb 6, 2023 · 3 comments
Open

2D view is clipping some data on the edges #1113

teh-cmc opened this issue Feb 6, 2023 · 3 comments
Labels
😤 annoying Something in the UI / SDK is annoying to use 🪳 bug Something isn't working ui concerns graphical user interface

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Feb 6, 2023

Consider this:
image

  • The top and bottom edges of e.g. the green rectangles are missing half their stroke width because the 2D view size doesn't take the radius into account
  • The right edge gets the same treatment, and in addition to that gets clipped some more because of the vertical separator of the selection panel

Worse, we're clipping an entire label here, as can be seen by moving one of the rectangle around:
image

@teh-cmc teh-cmc added 🪳 bug Something isn't working ui concerns graphical user interface 😤 annoying Something in the UI / SDK is annoying to use labels Feb 6, 2023
@emilk emilk added the good first issue Good for newcomers label Feb 28, 2023
@jleibs
Copy link
Member

jleibs commented Feb 28, 2023

Note: fixing the rectangle edges probably isn't that bad here, but capturing the labels inside the bounding box will be more involved.

The challenge is that bounding boxes are updated from the SceneSpatialPrimitives https://github.com/rerun-io/rerun/blob/jleibs/delete_classic_tensor/crates/re_viewer/src/ui/view_spatial/scene/primitives.rs#L66 but that structure doesn't have access to the labels.

@Wumpf
Copy link
Member

Wumpf commented Mar 1, 2023

Actually, the labels are placed by create_labels which is unified as of #1438 - that method could easily take the bounds into consideration and decide when a label should be snapped inside

@emilk
Copy link
Member

emilk commented Apr 4, 2023

We could solve the labels by moving them to inside of the visible viewport when painting them

@emilk emilk removed the good first issue Good for newcomers label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 🪳 bug Something isn't working ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

4 participants