-
Notifications
You must be signed in to change notification settings - Fork 89
Fix no auto_bounds preventing pan/zoom/scroll #218
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
Conversation
The previous logic would force reset the bounds for an axis if its auto_bounds was false. I believe that the behavior of mem.auto_bounds already sufficiently achieves the intended behavior here. Scenarios tested: - User can pan/zoom/scroll with auto_bounds true/false - Double-click resets auto_bounds the plot (regardless of default_auto_bounds setting) - Plot bounds are updated when plot data changes after double-clicking - User can still interact with the plot (pan/zoom/scroll) after double-clicking Fixes emilk#151
|
View snapshot changes at kitdiff |
kitizz
left a comment
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 going to write a test case for this. Not seeing any examples for non-screenshot based tests in this repo. Just need to go and figure out how to set up a Context and Ui for testing...
| } | ||
|
|
||
| // Reset bounds to initial bounds if they haven't been modified. | ||
| if (!self.default_auto_bounds.x && !any_dynamic_modifications) || mem.auto_bounds.x { |
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 hope my understanding of the full intention here is correct. I thought long and hard about it, and played around with a number of different configurations, and this works well.
But I'm suspicious that I'm missing something important
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 could not find any problems here either
|
Writing tests is blocked on some missing features in (See #219) |
bircni
left a comment
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.
lgtm
Lets get this in prod and write an issue to write test once the kittest is added
| } | ||
|
|
||
| // Reset bounds to initial bounds if they haven't been modified. | ||
| if (!self.default_auto_bounds.x && !any_dynamic_modifications) || mem.auto_bounds.x { |
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 could not find any problems here either
|
Good job, thank you! I did not find any issues either. Agreed we need non-screenshot tests, and thank you so much for taking an initiative in this direction, it's exactly what is needed here! |
The previous logic would force reset the bounds for an axis if its auto_bounds was false. I believe that the behavior of mem.auto_bounds already sufficiently achieves the intended behavior here.
Scenarios tested: