Skip to content

Commit

Permalink
convert to new ComboBoxItem, phetsims/sun#450
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <[email protected]>
  • Loading branch information
pixelzoom committed Jan 17, 2019
1 parent 1ad8615 commit 7ecdf0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/common/view/SoluteComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define( function( require ) {

// modules
var ComboBox = require( 'SUN/ComboBox' );
var ComboBoxItem = require( 'SUN/ComboBoxItem' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
Expand Down Expand Up @@ -50,7 +51,7 @@ define( function( require ) {
/**
* Creates an item for the combo box.
* @param solute
* @returns {*|{node: *, value: *}}
* @returns {ComboBoxItem}
*/
var createItem = function( solute ) {
var node = new Node();
Expand All @@ -68,7 +69,7 @@ define( function( require ) {
node.addChild( textNode );
textNode.left = colorNode.right + 5;
textNode.centerY = colorNode.centerY;
return ComboBox.createItem( node, solute );
return new ComboBoxItem( node, solute );
};

return inherit( ComboBox, SoluteComboBox );
Expand Down

0 comments on commit 7ecdf0d

Please sign in to comment.