-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Plot boxed zoom #1188
Plot boxed zoom #1188
Conversation
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.
Nice! Please add instructions for this in the "Instructions" tab in the pot demo. It would also be good to document in the docstring for Plot
.
add emlik update on changelog Co-authored-by: Emil Ernerfeldt <[email protected]>
add emlik update on comment in mod.rs Co-authored-by: Emil Ernerfeldt <[email protected]>
This is a great feature! 👍 I wonder, if instead of a enum RegionZoom {
None, // disallow
Rect, // rect/box, like current PR
XRange, // only horizontal, along X axis
YRange, // only vertical, along Y axis
} The X/Y ones are for scaling only along one axis: |
@emilk tests are passing my side, I updated with all your comments. 👍 |
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.
awesome!
Hello,
Very happy to make my first contribution here!
This adds boxed zooming feature on plots.
demo: https://www.youtube.com/watch?v=oUSWUgdFBCs
To allow the feature to work I added:
Plot::allow_boxed_zoom(bool)
. Defaulttrue
Plot::boxed_zoom_pointer(PointerButton)
. Default:Secondary
PlotMemory::last_click_pos_for_zoom: Option<Pos2>
, DefaultNone
ScreenTransform::bounds_mut(&mut self) -> &mut PlotBounds
Also changelog has been updated, check.sh is passing. And next time I will make sure to create an issue first.
I had a little non related issue in check.sh so double check for me please.
Regards,