-
Notifications
You must be signed in to change notification settings - Fork 90
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
Feature chart auto zoom #58
Conversation
I wouldn't make it the default yet, but I think that's a nice feature. I did notice a bug though that causes the zoom to no longer work when dragging outside the chart area if it has already zoomed in. https://youtu.be/E8IqK22UAS0?t=14 The initial zoom (14s) works as expected, but subsequent ones don't change the view. It does add a frame though, so I need to right-click multiple times to return. |
Complexity increasing per file
==============================
- chartfx-chart/src/main/java/de/gsi/chart/ui/ObservableDeque.java 4
See the complete overview on Codacy |
@ennerf thanks for having a look at it. I tried to reproduce your observations with a modified RollingBufferSample (ie. adding the Zoomer plugin, enabling the auto-zoom feature) but could not reproduce it and/or I may have misunderstood this. Could you maybe elaborate... Thanks in advance and much appreciated. |
Sorry, it's a bit tough to explain. Below is a picture Action Expected Behavior Actual Behavior |
... strange. With the modified RollingBufferSample it works for me as expected ... 'zoom in V' (-> reduces y range), then another zoom in V (-> further reduces y range). ?? |
I just tried this again with a simplified example and couldn't reproduce it anymore. It's weird that dragging between two points on the viewable screen always works as expected, but the X-Axis area can break. Anyways, it seems that the issue is somewhere else. Sorry for the false alarm! |
|
added auto-zoom and ObservableDeque feature to Zoomer plugin
added auto-zoom and ObservableDeque feature to Zoomer plugin
Added new auto zoom feature that limits zooms to X, Y, or XY depending on whether the mouse is dragged predominantly in X, Y, or XY (ie. diagonally). See ZoomerSample for details and how to use.
Added also an ObservableDeque to allow to monitor the zooming state stack. This may be used to trigger other UI actions in response to zooms (ie. pausing acquisitions/update).
@dedeibel and @ennerf you might be interested in this.
N.B. the auto-zoom is optional but we may consider making this the default...
Enjoy!