Skip to content

Commit

Permalink
https://github.com/phetsims/ph-scale/issues/92
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 6, 2020
1 parent 9730562 commit dec5f52
Show file tree
Hide file tree
Showing 2 changed files with 2,185 additions and 931 deletions.
10 changes: 8 additions & 2 deletions js/common/view/SoluteComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define( require => {
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const phScale = require( 'PH_SCALE/phScale' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );

class SoluteComboBox extends ComboBox {
Expand All @@ -35,7 +36,10 @@ define( require => {
yMargin: 16,
highlightFill: 'rgb( 218, 255, 255 )',
buttonLineWidth: 3,
cornerRadius: 10
cornerRadius: 10,

// phet-io
tandem: Tandem.REQUIRED
}, options );

// {ComboBoxItem[]}
Expand Down Expand Up @@ -71,7 +75,9 @@ define( require => {
children: [ colorNode, textNode ]
} );

return new ComboBoxItem( hBox, solute );
return new ComboBoxItem( hBox, solute, {
tandemName: _.camelCase( solute.name ) //TODO #92 it this too clever?
} );
}

return SoluteComboBox;
Expand Down
Loading

0 comments on commit dec5f52

Please sign in to comment.