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

Possible to grab two things with one finger #191

Closed
KatieWoe opened this issue Nov 7, 2019 · 8 comments
Closed

Possible to grab two things with one finger #191

KatieWoe opened this issue Nov 7, 2019 · 8 comments

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Nov 7, 2019

Test device
Dell or iPad
Operating System
Win 10 or iOS 12
Browser
Chrome or Safari
Problem description
For phetsims/qa#455. Not in published version.
When dragging around the ruler using touch, passing over a robot will pick it up as well. This can be disruptive to user experience.
Steps to reproduce

  1. Use touch to grab the ruler (twice to avoid Ruler only moves 1/2 of the time #189)
  2. Drag it over the robots a few times

Visuals
multigrab

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Gravity Force Lab‬
URL: https://phet-dev.colorado.edu/html/gravity-force-lab/2.2.0-dev.16/phet/gravity-force-lab_all_phet.html
Version: 2.2.0-dev.16 2019-11-06 21:45:42 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36
Language: en-US
Window: 1536x722
Pixel Ratio: 2.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: {}

@zepumph
Copy link
Member

zepumph commented Nov 8, 2019

Tagging @arouinfar, the ISLCObjectNode has a DragListener on it that is set to allow touch snag. This is a byproduct of this. I am not familiar with why allowTouchSnag: true was set for the pullers/masses. Is this desired behavior? Please note that this will effect GFL(B) and coulombs law.

@zepumph zepumph assigned arouinfar and unassigned zepumph Nov 8, 2019
@zepumph
Copy link
Member

zepumph commented Nov 8, 2019

Oh wait, perhaps this isn't right. It may be possible for a listener to "box out" any other listeners from accessing the current pointer. If so, is that what you want?

@zepumph
Copy link
Member

zepumph commented Nov 11, 2019

Please ignore the above commits, they were meant for #172

@arouinfar
Copy link

@zepumph I don't think touchSnag is necessary in this sim or GFLB because the masses are quite large. However, it would be nice to keep in Coulomb's Law because the charges are quite small on the Atomic Scale screen.

It may be possible for a listener to "box out" any other listeners from accessing the current pointer. If so, is that what you want?

It sounds like this would effectively disable touchSnag on the masses while the ruler is being dragged. If so, I think it'd be worth trying out @zepumph.

@arouinfar arouinfar assigned zepumph and unassigned arouinfar Nov 13, 2019
zepumph added a commit to phetsims/inverse-square-law-common that referenced this issue Nov 19, 2019
zepumph added a commit that referenced this issue Nov 19, 2019
zepumph added a commit to phetsims/coulombs-law that referenced this issue Nov 19, 2019
@zepumph
Copy link
Member

zepumph commented Nov 19, 2019

This issue could be solved by just adding the "attach: true" flag to the MovableDragHandler, but I figured that this was a good reason to convert to the more modern DragListener, which attaches to the pointer by default.

The only issue about the current strategy is that this conversion suffers from phetsims/scenery#1014, and as a result, I had to turn off the "applyOffset" option. So currently the ruler center jumps to the pointer location. This should only be temporary though. @KatieWoe can you confirm that this is issue is fixed on master?

@zepumph
Copy link
Member

zepumph commented Nov 19, 2019

I'm going to add "blocks-sim-publication here until phetsims/scenery#1014 is fixed, if it will take a while, then perhaps I will create another issue to solve it.

@KatieWoe
Copy link
Contributor Author

Looks good on master.

@zepumph
Copy link
Member

zepumph commented Dec 13, 2019

This has been fixed by phetsims/scenery#1014. The offset is being recognized now. Closing.

@zepumph zepumph closed this as completed Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants