-
Notifications
You must be signed in to change notification settings - Fork 75
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
switch order of setting ymin and ymax #3371
Conversation
I tried running this test on |
Huh, the same test fails in a notebook on main. Maybe this requires the image to actually be rendered? edit: The test does pass in the notebook if i don't do imviz.show() |
Hm, yeah, seems like it requires actual rendering of the app then. You can probably just remove the test then, no need to run it if it's not checking anything? 🤷 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3371 +/- ##
=======================================
Coverage 88.11% 88.11%
=======================================
Files 127 127
Lines 19574 19574
=======================================
Hits 17248 17248
Misses 2326 2326 ☔ View full report in Codecov by Sentry. |
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.
I'm fine with merging this, but it perhaps warrants a deeper investigation at some point about why this matters.
This fixes an issue where back-to-back calls to set_limits and get_limits were producing different results for y limits. For example,
viewer.set_limits(x_min=0, x_max=20, y_min=0, y_max=20)
limits = viewer.get_limits()
(0, 20.0, 3.855, 16.145).
For whatever reason, switching the order that ymin and ymax are set fixes this issue. I'm not sure if this entirely fixes the zoom/resize issue noted in #3369, but it resolves this round tripping that should work. There is still a deeper issue going on here.