phetsims / color-vision

"Color Vision" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/color-vision
GNU General Public License v3.0
1 stars 7 forks source link

Reconsider PhET-iO pattern and fix bogus doc #147

Closed pixelzoom closed 10 months ago

pixelzoom commented 10 months ago

TODO with no GitHub issue added to RGBPhotonBeamNode by @samreid for https://github.com/phetsims/phet-io/issues/374. Note that the doc is also bogus, and refers to "skater node".

    // TODO: alternatively, use the pattern in TrackNode? https://github.com/phetsims/tasks/issues/1129
    // In the state wrapper, when the state changes, we must update the skater node
    Tandem.PHET_IO_ENABLED && phet.phetio.phetioEngine.phetioStateEngine.stateSetEmitter.addListener( () => {
      this.invalidatePaint();
    } );
samreid commented 10 months ago

I reviewed the case above and determined it is consistent with our best practices for this context. So I revised the documentation and committed. @pixelzoom would you like to review? Please close if all is well.

pixelzoom commented 10 months ago

👍🏻