phetsims / balancing-chemical-equations

"Balancing Chemical Equations" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/balancing-chemical-equations
GNU General Public License v3.0
2 stars 5 forks source link

Handle overridden Node.setEnabled method #145

Closed zepumph closed 4 years ago

zepumph commented 4 years ago

Since setEnabled and isEnabled were added to Node in phetsims/scenery#1100, there are places where setEnabled is now overridden where before it was a standalone method. This could be confusing. I think it is likely best to rename the local method, or handle each case individually.

Effected usages:

pixelzoom commented 4 years ago

Self assigning, since I'm the responsible developer for this sim.

pixelzoom commented 4 years ago

EquationNode setEnabled is used in the Game screen (GamePlayNode.js). TermNode setEnabled is called exclusively by EquationNode setEnabled, and calls setArrowsVisible for each coefficient (NumberPicker). The desired result is hide the arrows for the NumberPickers, so that their values can't be changed.

pixelzoom commented 4 years ago

Addressed in the above commit. Name changes are as follows:

EquatioNode setEnabled -> setCoefficientsEditable TermNode.setEnabled -> setCoefficientEditable

@zepumph please review.

zepumph commented 4 years ago

Looks great to me. Thanks!