Skip to content
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

Panning is buggy #108

Closed
Tracked by #1024
Nancy-Salpepi opened this issue Dec 14, 2023 · 13 comments
Closed
Tracked by #1024

Panning is buggy #108

Nancy-Salpepi opened this issue Dec 14, 2023 · 13 comments
Labels

Comments

@Nancy-Salpepi
Copy link

For phetsims/qa#1014 and also seen in phetsims/qa#1009 and phetsims/qa#1016:

When zoomed in, the screen pans slightly or not at all. This behavior is different than published.

This video shows the Operations Screen first in the rc version and then in published:

panNLO.mp4
@Nancy-Salpepi Nancy-Salpepi added the type:bug Something isn't working label Dec 14, 2023
@jessegreenberg
Copy link
Contributor

I just saw this go by, Ill take a look as well.

@jessegreenberg jessegreenberg self-assigned this Dec 14, 2023
@Nancy-Salpepi
Copy link
Author

For phetsims/qa#1016 the buggy panning behavior is most evident in the first and third scenes on the Explore Screen, when an object is removed from the bottom panel and dragged upwards.
This isn't seen in published.

@jessegreenberg
Copy link
Contributor

It looks like the sim used to pan to keep the thumb centered, but now it just pans to keep the thumb visible. Because of this, there are cases where the thumb isn't off-screen enough to trigger the pan. I can't see in the history where this changed, Ill check out the published nlo SHAs to see where this changed.

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Dec 19, 2023

Ah, NLO 1.0 is from 2021 and had a totally different implementation for dragging off screen. There used to be bounds along the edge of the screen and if the pionter was close to those bounds, it would always trigger a pan. Hmm...

@jessegreenberg
Copy link
Contributor

The main way to reproduce this is to keep the dev tools closed and try drag beyond the edge of the screen. If you drag off-window (into the dev tools or onto a second monitor), it works just fine because mouse move events continue to fire.

One way to fix this is just to add a bit of padding to the pan deltas used when panning to keep the target on-screen (but not centered, there is plenty of movement in that case).

I tested it in NLO, geometric-optics, and my-soloar-system, and BASE. I think it feels pretty nice! But @Nancy-Salpepi can you please spot check sims where you can do this kind of pan + drag?

@marlitas can you please also review and test?

@marlitas
Copy link
Contributor

@jessegreenberg the commit looks very reasonable and the panning behavior seems much better in my testing. I would be more comfortable to fully sign off after @Nancy-Salpepi is able to take a look as well though.

@Nancy-Salpepi
Copy link
Author

looking now!

@Nancy-Salpepi
Copy link
Author

Nancy-Salpepi commented Dec 19, 2023

@jessegreenberg and @marlitas in Number Line: Distance, in the first scene of the Explore screen, if I move the character along the sidewalk, the screen doesn't pan. I have to lift the character off the sidewalk first for panning to happen.

Similarly, in the third screen, the screen pans if I move a character anywhere BUT in the "altitude scene" itself--no panning happens there.

EDIT: I see the same thing with the thermometers in the 2nd scene--no panning occurs if I move them within the "temperature scene".

I'll keep looking to see if I notice anything else.

@Nancy-Salpepi
Copy link
Author

I see the same issue above in the non-number line screens/screens in Number: Line Integers.

All looks good in CaV, GO, Function Builder, CCK-AC & Density.

@jessegreenberg
Copy link
Contributor

Awesome - Thanks for the test @Nancy-Salpepi. Those are good finds, but luckily unrelated to this change. They are specific to the way the sim is controlling movement when controlling a number line point. So I believe this change is good for NL:O release and ready to cherry-pick.

@marlitas back to you. Do you agree this change is good to cherry-pick for NL:O? How should we track/investigate this NL:I/NL:D issue? Are those sims close to publication as well?

@marlitas
Copy link
Contributor

Ahh that's unfortunate, I was hoping it would fix all of them. Yes we can have this as a cherry-pick specifically for NL:O.

@jessegreenberg NL:I and NL:D are also close to publication (both in RC as well). I'll create an issue in each. So it seems like each fix might be implementation specific?

@marlitas
Copy link
Contributor

I'll mark this as ready for cherry pick for NLO. I created the other two issues and assigned you to both @jessegreenberg. I'll take an initial look as well as time allows today.

@Nancy-Salpepi
Copy link
Author

looks good in rc.2
Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants