phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

Support setting a partial instead of total state #230

Closed samreid closed 4 years ago

samreid commented 4 years ago

From phetsims/phet-io#1697: There is 1 or more call to phetioStateEngine.stateSetEmitter.addListener. There is now a 2nd argument to the listener, which is a predicate that tests Tandems and returns true if they are in scope. We should check these listeners and see if any of them need to check whether they are in scope of a partial state set.

zepumph commented 4 years ago

I confirmed that the stateSetEmitter listener in the lab screen was called when other screens' were reset. While this particular case ended up just doing work that acted as a no-op, it still feels best to guard it. Closing