Skip to content

fix: boxed_zoom_rect not in foreground#242

Open
IVAN-MK7 wants to merge 1 commit into
emilk:mainfrom
IVAN-MK7:fix-boxed-zoom-rect-not-in-foreground
Open

fix: boxed_zoom_rect not in foreground#242
IVAN-MK7 wants to merge 1 commit into
emilk:mainfrom
IVAN-MK7:fix-boxed-zoom-rect-not-in-foreground

Conversation

@IVAN-MK7

@IVAN-MK7 IVAN-MK7 commented Apr 7, 2026

Copy link
Copy Markdown

This PR reverts the regression introduced in the 0.35.0 release, where the boxed_zoom_rect gets painted behind the plot's content (shapes, images, grid, etc...), effectively restoring the behaviour present up to the 0.34.0 release, bringing back the drawn rectangle to the foreground.

The issue and the resulting appearence are thoroughly documented in the issue this PR addresses:

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

View snapshot changes at kitdiff

@stephenberry

Copy link
Copy Markdown

Can we get this merged? I ran into the same issue and it's really bad for PlotImage because the selection box can't be seen at all.

@lucasmerlin lucasmerlin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think moving this down would introduce a frame delay when moving the camera.
Maybe instead we can return a Vec from handle_interaction that we can later add to the painter to solve the ordering issue?

@IVAN-MK7

Copy link
Copy Markdown
Author

This PR fixes the mentioned bug, I've been using it for the last few months and didn't notice any issue that could have been caused by it.
A frame delay side effect seems plausible, but it's less of an issue that the bug it solves, so I think it can be addressed after the merge, or by including now in the discussion those who worked on that method, because I'm not diving into it when they definitely understand it more, regarding this and other eventual side effects that I might miss, and can act quicker.
Seeing the commits that caused the bug, I'm tagging @michalsustr, hopefully he knows the behind the scenes of it, and did not just do a refactor.

Also, the visual testing of the app resulting from this library should be improved, have it been done better this issue would't have come up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boxed_zoom_rect gets painted behind the plot's items (shapes, images, etc...)

3 participants