From ec4dcd17685d5d4f6874334185ba539f06379930 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Tue, 30 Aug 2022 18:18:47 -0600 Subject: [PATCH] TODOs for https://github.com/phetsims/molecule-polarity/issues/140 --- js/common/view/DipoleDirectionRadioButtonGroup.js | 2 ++ js/common/view/PartialChargeNode.js | 1 + js/realmolecules/model/RealMolecule.js | 1 + js/realmolecules/view/RealMoleculeViewer.js | 2 ++ js/realmolecules/view/RealMoleculesComboBox.js | 1 + 5 files changed, 7 insertions(+) diff --git a/js/common/view/DipoleDirectionRadioButtonGroup.js b/js/common/view/DipoleDirectionRadioButtonGroup.js index b2bdb09..14fb554 100644 --- a/js/common/view/DipoleDirectionRadioButtonGroup.js +++ b/js/common/view/DipoleDirectionRadioButtonGroup.js @@ -39,12 +39,14 @@ class DipoleDirectionRadioButtonGroup extends AquaRadioButtonGroup { }, MPConstants.AQUA_RADIO_BUTTON_OPTIONS, options ); // d+ -> d- + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale const positiveToNegativeString = StringUtils.fillIn( moleculePolarityStrings.pattern.dipoleDirection, { from: moleculePolarityStrings.deltaPlus, to: moleculePolarityStrings.deltaMinus } ); // d- -> d+ + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale const negativeToPositiveString = StringUtils.fillIn( moleculePolarityStrings.pattern.dipoleDirection, { from: moleculePolarityStrings.deltaMinus, to: moleculePolarityStrings.deltaPlus diff --git a/js/common/view/PartialChargeNode.js b/js/common/view/PartialChargeNode.js index daecf1c..9e92640 100644 --- a/js/common/view/PartialChargeNode.js +++ b/js/common/view/PartialChargeNode.js @@ -57,6 +57,7 @@ class PartialChargeNode extends Node { if ( partialChargeVisible ) { // d+ or d- + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale textNode.text = ( partialCharge > 0 ) ? moleculePolarityStrings.deltaPlus : moleculePolarityStrings.deltaMinus; // size proportional to bond dipole magnitude diff --git a/js/realmolecules/model/RealMolecule.js b/js/realmolecules/model/RealMolecule.js index e9900ba..3787b17 100644 --- a/js/realmolecules/model/RealMolecule.js +++ b/js/realmolecules/model/RealMolecule.js @@ -16,6 +16,7 @@ import moleculePolarity from '../../moleculePolarity.js'; class RealMolecule extends PhetioObject { + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale /** * @param {string} symbol - chemical symbol of the molecule * @param {string} fullName - full name of the molecule diff --git a/js/realmolecules/view/RealMoleculeViewer.js b/js/realmolecules/view/RealMoleculeViewer.js index 1c85897..35f0d4f 100644 --- a/js/realmolecules/view/RealMoleculeViewer.js +++ b/js/realmolecules/view/RealMoleculeViewer.js @@ -117,6 +117,8 @@ class RealMoleculeViewer extends Node { // unlink not needed moleculeProperty.link( molecule => { + + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale moleculeText.text = StringUtils.fillIn( moleculePolarityStrings.pattern.symbolName, { symbol: molecule.symbol, name: molecule.fullName diff --git a/js/realmolecules/view/RealMoleculesComboBox.js b/js/realmolecules/view/RealMoleculesComboBox.js index 0afcded..4b60cc6 100644 --- a/js/realmolecules/view/RealMoleculesComboBox.js +++ b/js/realmolecules/view/RealMoleculesComboBox.js @@ -63,6 +63,7 @@ class RealMoleculesComboBox extends ComboBox { function createItem( molecule ) { assert && assert( molecule instanceof RealMolecule, 'invalid molecule' ); + //TODO https://github.com/phetsims/molecule-polarity/issues/140 support for dynamic locale const text = StringUtils.fillIn( moleculePolarityStrings.pattern.symbolName, { symbol: molecule.symbol, name: molecule.fullName