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

InputEnabled vs grabDragInteraction enabled #285

Closed
KatieWoe opened this issue Mar 31, 2022 · 4 comments
Closed

InputEnabled vs grabDragInteraction enabled #285

KatieWoe opened this issue Mar 31, 2022 · 4 comments

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Mar 31, 2022

Device
Dell
OS
Win 11
Browser
Chrome
Problem Description
For phetsims/qa#791
In studio, I noticed that if you want to disable dragging for the zoomed out book you use friction.frictionScreen.view.topBookNode.inputEnabledProperty but if you want to disable dragging in the zoomed in book friction.frictionScreen.view.atomicView.grabDragInteraction.enabledProperty doesn't work instead you need to use friction.frictionScreen.view.atomicView.atomDragArea.inputEnabledProperty. This seems inconsistent to me.

@KatieWoe
Copy link
Contributor Author

KatieWoe commented Apr 1, 2022

I think I had things a bit mixed up, so this may not be a bug. But I am confused as to what grabDragInteraction.enabledProperty does?

@zepumph
Copy link
Member

zepumph commented Jul 8, 2022

Yes I agree this is confusing. It is best to just toggle friction.frictionScreen.view.atomicView.atomDragArea.inputEnabledProperty , and then the keyboard interaction for the atomicView drag area also turns off, see phetsims/scenery-phet#720. I made it the same way with the friction.frictionScreen.view.topBookNode.inputEnabledProperty controlling the macro grabDragInteraction too.

@arouinfar, does this seem reasonable to you? Note that grabDragInteraction.enabledProperty is the phetioReadOnly: true, but toggling the inputEnabledProperty will dissallow keyboard interaction too.

@arouinfar
Copy link
Contributor

Sounds good to me @zepumph.

@arouinfar arouinfar assigned zepumph and unassigned arouinfar Jul 8, 2022
zepumph added a commit to phetsims/inverse-square-law-common that referenced this issue Jul 8, 2022
zepumph added a commit to phetsims/gravity-force-lab that referenced this issue Jul 8, 2022
zepumph added a commit to phetsims/coulombs-law that referenced this issue Jul 8, 2022
@zepumph
Copy link
Member

zepumph commented Jul 8, 2022

Perfect. Above I fixed GFL as well, which actually didn't have inputEnabled instrumented (in a buggy way) even though we wanted it, and we were passing the option through. I fixed it above!

@zepumph zepumph closed this as completed Jul 8, 2022
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