Skip to content

Commit

Permalink
create ComboBox items using createItem, phetsims/sun#428
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <[email protected]>
  • Loading branch information
pixelzoom committed Jan 5, 2019
1 parent 19c78e6 commit f965b5f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions js/real/RealMoleculesScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ define( function( require ) {
var comboBoxListContainer = new Node();
var comboBoxMolecules = model.isBasicsVersion ? RealMoleculeShape.TAB_2_BASIC_MOLECULES : RealMoleculeShape.TAB_2_MOLECULES;
var comboBox = new ComboBox( _.map( comboBoxMolecules, function( realMoleculeShape ) {
return {
value: realMoleculeShape,
node: new RichText( ChemUtils.toSubscript( realMoleculeShape.displayName ), {
// default font is OK
} )
};
return ComboBox.createItem( new RichText( ChemUtils.toSubscript( realMoleculeShape.displayName ) ), realMoleculeShape );
} ), model.realMoleculeShapeProperty, comboBoxListContainer, {} );
var optionsNode = new OptionsNode( model );

Expand Down

0 comments on commit f965b5f

Please sign in to comment.