-
Notifications
You must be signed in to change notification settings - Fork 476
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
Constrains
should scroll rather than zoom if possible.
#537
Comments
Someone already pushed a PR for this (PR #386), however I do not think this will fix it (or at least not anymore) |
There is a similar issue with zooming out. When one side of the axis is against the limit constraint, and the mouse is near the other side, zooming-out is extremely slow. Because of the left/mouse vs right/mouse ratio, most of the change is on the opposite side of the mouse, which is against the limit constraint and thus gets "undone", while the side of the mouse gets little change. See the video, where zooming out is "quick" at first, until the limit constraint is reached, after which is very slow. Zoom.mp4 |
Third weird behavior:
In the video below, I select the range [-0.5, 0], which is too small. The result is [-0.5, 0.5], while one would more expect [-0.75, 0.25] (i.e. grow the box, but keep it centered on the selection instead of "left aligned") Selection.mp4 |
…#537) - Make scrolling not affect the zoom level when near the axis limit constraint - Keep the zoom-out speed constant when one side of the axis is against the limit constraint while the mouse is on the other side - When doing box-selection with a size smaller that the minimum zoom, keep the final box centered on the selection instead of "left aligning" it.
When scrolling an axis, if the new axis range gets outside the constraints, Implot will fix the limit that is outside and leave the other unchanged (if applicable). It will then compute what the zoom level must be. A user is probably not expecting the zoom to be changed.
For instance, the "Axis constraints" example:
=> Take note of the right limit: it is no longer +8 but much less (in my video, it's now -2.5 or so).
Constraint.mp4
Expected:
When correcting one side of an axis, the other side should be changed by the same amount, and if both sides cannot fit within the constraints (i.e. the user must be zooming out, or the constraints changed), then and only then should the zoom factor be changed.
The text was updated successfully, but these errors were encountered: