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

Touch area on movable lid doesn't always work #318

Closed
KatieWoe opened this issue Aug 6, 2020 · 5 comments
Closed

Touch area on movable lid doesn't always work #318

KatieWoe opened this issue Aug 6, 2020 · 5 comments
Assignees
Labels

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Aug 6, 2020

Device
IPad 6th Gen
OS
iPadOS 13.6
Browser
App, Safari
Problem Description
For phetsims/qa#525.
The touch pointer areas on the movable lid don't seem to line up with what can actually be grabbed. It mostly seems to impact parts of the lid that aren't handle or hand, so it may be intended. However, the showPointerAreas outlines seem to indicated these areas as grabable and the green "move me" arrows show up when you try, even though you don't actually grab anything.

Visuals
ezgif com-video-to-gif

@jbphet
Copy link
Contributor

jbphet commented Aug 7, 2020

I tried a number of things to try to correct this, including updating the listener that shows and hides the hint (the green arrows) to be a PressListener, which I think would be the currently recommended approach. None of what I tried corrected the behavior. It seems to me that the problem only exists in the area where the touch area for the pointing hand image overlaps with the draggable ellipse on the lid. Dragging on the image outside of the lid or the lid outside of the image seems to work fine.

@jonathanolson - can you take a look and see if there is anything you would recommend to fix this, or whether it is perhaps an issue with drag listeners in overlapping touch areas? A good place to start would be to search for DragListener in both PointingHandNode.js and ParticleContainerNode.

@jbphet
Copy link
Contributor

jbphet commented Aug 12, 2020

@jonathanolson helped me on this, and it turns out that the touch area of the entire pointing hand node was being expanded, but the drag handler was only on the image, so the expanded touch area was catching touch and drag events but not doing anything with them. I've changed things such that the touch area of the hand image is expanded instead, and this seems to have resolved the problem.

@jbphet
Copy link
Contributor

jbphet commented Aug 12, 2020

I've cherry-picked the commit to the 1.2 release branch, this should be good to go, and we can verify it in the next RC.

@KatieWoe
Copy link
Contributor Author

Touch area seems to work now (although it looks smaller in showPointerAreas for some reason). If that's ok, feel free to close.
lookssmaller

@jbphet
Copy link
Contributor

jbphet commented Aug 18, 2020

Yes, this is actually an expected result since the expanded bounds are now on the pointing finger image and not on the node as a whole, the bounds of which included the green arrows "hint". Closing.

@jbphet jbphet closed this as completed Aug 18, 2020
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