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

unnecessary call to this.mutate #58

Closed pixelzoom closed 10 years ago

pixelzoom commented 10 years ago

IconToggleNode:

55 HBox.call( this, { spacing: options.spacing, children: [buttonOne, buttonTwo] } ); 56 57 this.mutate( options );

There's no need to call mutate, because you're not doing anything after calling supertype constructor. Recommended to change to:

options.children = [buttonOne, buttonTwo]; HBox.call( this, options );

aaronsamuel137 commented 10 years ago

Good idea, I've made this change.

aaronsamuel137 commented 10 years ago

Closing.