-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dragging ruler while zoomed in leads to uncontrolled panning #367
Comments
I don't see how this can be addressed -- or really why it needs to be addressed. You need to be able to see the full ruler to place it. If you can't see the full ruler, you should zoom out. @arouinfar @jessegreenberg thought? |
This behavior is not unique to Geometric Optics, the same happens in master with the ruler in Gravity Force Lab. This seems like a natural consequence of the size of the ruler exceeding the zoom bounds.
Agreed @pixelzoom. It doesn't seem like anything that needs to be addressed, but I'll defer to @jessegreenberg's judgment. |
I agree that one needs to zoom out to place it but dragging it does feel out of control. As soon as you tap on the ruler the whole screen pans so that the left most side of the ruler is in view and it is disorienting. Taking a look. |
I propose that we don't pan objects that are larger than the available screen size during drag. When the object can be fully contained by the available screen space we pan to keep it in view. Otherwise you need to drop the object and drag the screen to understand where you are going. Example: @kathy-phet or @KatieWoe can you try this on master and comment if this is more expected behavior and an expectable rule for the pan/zoom feature generally? |
Seems reasonable to me. Adding @arouinfar to the "try on master" assignment. |
I think it behaves much better now. |
Thanks @jessegreenberg, the behavior in master looks much better to me.
This seems like something we would want to generalize to any draggable object. Not sure if it has already been generalized, or if it needs a separate issue to track, so back to @jessegreenberg. |
OK sounds good. Yes, this is being done generally in phetsims/scenery#1381. Ill consider that a sign-off for this change and finish up over there. |
Test device
Dell
Operating System
Win 11
Browser
Chrome
Problem description
Found in master on 3/11/22. First discovered by @kathy-phet.
When you drag the ruler while the sim is zoomed in, it can be very hard to place it in an intended position. Panning occurs any time you move the mouse, and also occurs the second you pick up the ruler. This makes it hard to place the ruler where you want it.
Steps to reproduce
Visuals
Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: Geometric Optics
URL: https://bayes.colorado.edu/dev/phettest/geometric-optics/geometric-optics_en.html?ea&brand=phet
Version: 1.1.0-dev.36 (unbuilt)
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Language: en-US
Window: 1280x649
Pixel Ratio: 1.5/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 30 uniform: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}
The text was updated successfully, but these errors were encountered: