-
Notifications
You must be signed in to change notification settings - Fork 23
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
There is no way to zoom on a small slice #1407
Comments
Did you try passing a smaller threshold with the IMO, there's no point in complexifying this feature with complicated logic when the goal is just to prevent zooming on click as well as to prevent zooming on a 0px^2 area. |
That's not complex, that's just basic stuff. I talk about a slice of 2000x2 |
We discussed this with @t20100 and @loichuder back in April -- sorry for not following up sooner. The conclusion was that we weren't convinced by the need to zoom on such a thin slice, and thought it was more likely to happen by mistake (i.e. mouse button released at the wrong time while drawing the selection). Also, it seems easy-enough to reach the desired zoom level by either: drawing multiple zoom boxes in a row; or zooming once and then performing an axial zoom with the mouse wheel via a discoverable keyboard shortcut. |
I am very supprised that you decide on your own what is important and what is not for users. Especially for a very easy fix like that. |
So i have checked the code. Instead of using
This validation is one of the most annoying interaction. The reason i can see is to avoid some glitches with false interaction. But when you have spend 5 seconds to move your mouse, you are not in such situation. |
Okay... let's take it from the start.
Why is this a problem? I'm arguing that it's a good thing as it avoids mistakes. Zooming on a tiny slice can be quite disorienting.
Agreed, but this part of the issue is not a "very easy fix".
You're the one making the request, so it is up to you to build a case for it! 😝 I'm just making a judgement call with the information I've got, with my knowledge of the codebase, and after consultation with other experienced UI developers. If you're unhappy with this call, you're very welcome to provide counter-arguments. Have you actually seen real users try the interaction and become frustrated by it? Perhaps you have, but you haven't told us so and haven't described such a situation, so your word is as good as ours. Note also that we provide an issue template for a reason. Telling maintainers what should or shouldn't be done in their project just because is rarely the best way to get what you want. A typical way forward in this sort of situation is to give more control to the library consumer to change the default behaviour. Would it be satisfactory to you if I added a |
Yes and no. Because I don't understand why we couldn't have a default behaviour which work. This was the approve of this issue. But again, what If
If
I can argue why you think it's a mistake? Here i have only talked about the general use case. |
Thanks for taking the time to discuss this further, much appreciated.
With a sensitive mouse, trying to draw a very thin box is risky. Maybe you want a 2000x5px box but the action of releasing the mouse button makes you draw a 2000x2px box instead. And the thinner the slice, the less context you have to make sure you indeed zoomed at the right place. This is what I meant by "Zooming on a tiny slice can be quite disorienting." Moreover, drawing a very thin selection box takes a bit of time, either because the mouse is too sensitive and users have to move it very carefully, or because the mouse is not sensitive enough and they have to lift it off the desk a few times. The idea behind the
No worries, then! Happy to change the default behaviour if it leads to frustration for end users. That being said, I encourage you to think about ways to make axial-based zoom more discoverable in your UI so users become more efficient at zooming and do not try to zoom on tiny slices in the first place. Now we need to decide what happens to the
Either way, what should the default minimum distance be? |
I don't know what you mean. It's the default behaviour of my UI, because it's the default behaviour at the ESRF (used by PyMCA, silx, matplotlib). That's the way scientists interact with data. |
Sounds like the contraint to avoid zoom on click is taking the constraint on x and y independently.
As result there is no way to zoom on a small slice.
The 2 dimensions should be used together (distance or distance^2 or manhattan distance).
Also it would be much better to apply this constrain only at the start of the interaction.
If i create create a big rect and reduce it progressively during the interaction, the constraint should not be applied.
The text was updated successfully, but these errors were encountered: