-
Notifications
You must be signed in to change notification settings - Fork 6
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
When the sim is inactive, it should be grayed out #232
Comments
Here is a small change set that looks like it solves the problem. Can one of @jbphet @jonathanolson @pixelzoom review it? // When the sim is inactive, make it non-interactive, see https://github.com/phetsims/scenery/issues/414
var inactiveOverlay = new Node();
this.activeProperty.lazyLink( function( active ) {
sim.display.interactive = active;
if ( !active ) {
sim.showPopup( inactiveOverlay, true );
}
else {
sim.hidePopup( inactiveOverlay, true );
}
} ); |
The above code should surround the existing |
@samreid asked someone to review. I'll have a look. |
This is my first encounter with the sim.display.interactive property. I have no idea when (or why) we would be disabling mouse/touch/keyboard inputs, and can't find any documentation in joist. Also, the code that @samreid says should be surrounded is: // When the sim is inactive, make it non-interactive, see https://github.com/phetsims/scenery/issues/414
this.activeProperty.link( function( active ) {
sim.display.interactive = active;
} ); Note that the comment references phetsims/scenery#141, which is closed. @samreid and @jonathanolson, questions:
|
Assigning to @jonathanolson for feedback. |
My understanding of the "interactive" property is that it just shuts off actual user input, but still allows playing back previously recorded inputs. For playback, we want to fully disable the input from the user playing back previously recorded input events, since otherwise they could "insert" clicks/etc. and screw up the playback. Showing it as a popup is probably not a great way to accomplish this. Using CSS opacity on the entire sim might be the best option. |
@jonathanolson Another question... Is playback something that is currently used by any sims? Ie, does this need to be addressed for "Summer 2015 redeploy"? |
sim.active is used for together.js Beaker is using it at the moment as far as I know. |
I don't know of any usage on the sims on our website (excludes together and beaker). |
Assigning to @jbphet, since he's working on beaker. Does this need to be addressed for "Summer 2015 redeploy"? If not, remove the label. |
Actually for beaker it is important for it to be inactive without being grayed out. It is unclear if/when the sim should be grayed out for other inactive cases. |
I wonder if we could say this is the responsibility of the wrapper html, say, putting an opacity on the iframe..? |
I don't agree with the intent of this issue. We currently have two customers who are using together.js to build learning systems around PhET simulations. Both are using the inactive capability for playback or at least setting of state, and I don't think either would want the sim to gray out in this situation. Assigning back to @samreid to either justify or close. His suggestion in the comment immediately above about having it be the responsibility of the wrapper page might suffice. |
+1 for making this the responsibility of the wrapper. |
Let's leave this up to the wrapper unless/until we run into a limitation that cannot be overcome by the wrapper. Closing. |
Related to phetsims/scenery#414
The text was updated successfully, but these errors were encountered: