Skip to content

Commit

Permalink
convert ComboBoxItem from class to type, phetsims/sun#768
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jun 27, 2022
1 parent 3b66a05 commit eeff5fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/slits/view/SlitsControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ import merge from '../../../../phet-core/js/merge.js';
import NumberControl from '../../../../scenery-phet/js/NumberControl.js';
import { Node } from '../../../../scenery/js/imports.js';
import ComboBox from '../../../../sun/js/ComboBox.js';
import ComboBoxItem from '../../../../sun/js/ComboBoxItem.js';
import ToggleNode from '../../../../sun/js/ToggleNode.js';
import Scene from '../../common/model/Scene.js';
import WaveInterferencePanel from '../../common/view/WaveInterferencePanel.js';
import WaveInterferenceText from '../../common/view/WaveInterferenceText.js';
import WaveInterferenceConstants from '../../common/WaveInterferenceConstants.js';
import waveInterferenceStrings from '../../waveInterferenceStrings.js';
import waveInterference from '../../waveInterference.js';
import waveInterferenceStrings from '../../waveInterferenceStrings.js';

const cmValueString = waveInterferenceStrings.cmValue;
const nmValueString = waveInterferenceStrings.nmValue;
Expand Down Expand Up @@ -47,9 +46,9 @@ class SlitsControlPanel extends WaveInterferencePanel {
} );

const comboBox = new ComboBox( barrierTypeDynamicProperty, [
new ComboBoxItem( new WaveInterferenceText( oneSlitString ), Scene.BarrierType.ONE_SLIT ),
new ComboBoxItem( new WaveInterferenceText( twoSlitsString ), Scene.BarrierType.TWO_SLITS ),
new ComboBoxItem( new WaveInterferenceText( noBarrierString ), Scene.BarrierType.NO_BARRIER )
{ value: Scene.BarrierType.ONE_SLIT, node: new WaveInterferenceText( oneSlitString ) },
{ value: Scene.BarrierType.TWO_SLITS, node: new WaveInterferenceText( twoSlitsString ) },
{ value: Scene.BarrierType.NO_BARRIER, node: new WaveInterferenceText( noBarrierString ) }
], comboBoxParent, {
xMargin: 13,
yMargin: 6,
Expand Down

0 comments on commit eeff5fa

Please sign in to comment.