-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't pan during drag if an object is larger than the available screen bounds #1381
Comments
…e available screen space, see #1381
This seems like a pretty simple change, I am proposing it in phetsims/geometric-optics#367 to see if others agree it is acceptable. |
Behavior in phetsims/geometric-optics#367 was cleared by others on the team. Ill clean up the implementation and get it working better with alternative input (specifically KeyboardDragListener). |
In the above commits I made it so that we don't pan if the object is too large with mouse/touch. But we DO pan to the center of the object with keyboard input. It was not easy with focus to "drop" the object and drag the screen to a different area. Since dragging with focus pans to the center of the object instead however far we need to keep the object in view, this still looks and works well. I started a dev test after changes in this issue and in #1356. But I did lots of fuzz testing with all forms of input and tested several sims manually. Closing this issue, we will finish up in #1356. |
Related to #1356, but a more specific case. If an object is larger than the available pan bounds, panning to keep it in view is awkward. The object is larger than the screen so it doesn't make sense to pan to try to keep it in view. Currently, the screen pans to try to keep the bounds minX on the left of the screen.
Here is an example of how this looks odd for very wide objects, just clicking on a wide ruler does this:
I propose that if a draggable object is wider than the available screen bounds we disable panning. In this case you need to drop the object and pan to where you want to go. Otherwise, panning during drag will behave like #1365.
The text was updated successfully, but these errors were encountered: