From e5fa7c29a44276692387ad34d6e82fe9c9bd9390 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Thu, 17 Jan 2019 13:23:00 -0700 Subject: [PATCH] convert to new ComboBoxItem, https://github.com/phetsims/sun/issues/450 Signed-off-by: Chris Malley --- js/blackbox/view/BlackBoxSceneView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/blackbox/view/BlackBoxSceneView.js b/js/blackbox/view/BlackBoxSceneView.js index a03cc18..a6a9bc9 100644 --- a/js/blackbox/view/BlackBoxSceneView.js +++ b/js/blackbox/view/BlackBoxSceneView.js @@ -14,6 +14,7 @@ define( function( require ) { var ChallengeSet = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/blackbox/model/ChallengeSet' ); var circuitConstructionKitBlackBoxStudy = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/circuitConstructionKitBlackBoxStudy' ); var ComboBox = require( 'SUN/ComboBox' ); + var ComboBoxItem = require( 'SUN/ComboBoxItem' ); var inherit = require( 'PHET_CORE/inherit' ); var InteractionMode = require( 'CIRCUIT_CONSTRUCTION_KIT_COMMON/model/InteractionMode' ); var ModeRadioButtonGroup = require( 'CIRCUIT_CONSTRUCTION_KIT_BLACK_BOX_STUDY/blackbox/view/ModeRadioButtonGroup' ); @@ -103,13 +104,13 @@ define( function( require ) { }; // A different ComboBox instance appears in each BlackBoxSceneView - var elements = [ ComboBox.createItem( + var elements = [ new ComboBoxItem( new Text( 'Warm-up', comboBoxTextOptions ), // TODO: i18n 'warmup', { tandemName: 'warmup' } ) ]; for ( var i = 0; i < ChallengeSet.challengeArray.length; i++ ) { - elements.push( ComboBox.createItem( + elements.push( new ComboBoxItem( new Text( 'Black Box ' + ( i + 1 ), comboBoxTextOptions ), // TODO: i18n 'scene' + i, { tandemName: 'scene' + i @@ -121,6 +122,8 @@ define( function( require ) { this.addChild( listParent ); var sceneSelectionComboBox = new ComboBox( elements, sceneProperty, listParent, { + xMargin: 12, + yMargin: 10, cornerRadius: 6, tandem: tandem.createTandem( 'sceneSelectionComboBox' ) } );