Skip to content

Commit

Permalink
PhET-iO instrumentation of WavelengthNubmberControl, phetsims/scenery…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 4, 2022
1 parent 4ff925b commit 6e92270
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/beerslaw/view/WavelengthPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class WavelengthPanel extends Panel {
tandem: options.tandem.createTandem( 'radioButtonGroup' )
} );

const wavelengthSlider = new WavelengthNumberControl( light.wavelengthProperty, {
const wavelengthNumberControl = new WavelengthNumberControl( light.wavelengthProperty, {
spectrumSliderTrackOptions: {
size: SLIDER_TRACK_SIZE
},
Expand All @@ -109,7 +109,7 @@ class WavelengthPanel extends Panel {
resize: false, // prevent slider from causing a resize when thumb is at min or max
children: [ decrementButton, slider, incrementButton ]
} ),
tandem: options.tandem.createTandem( 'wavelengthSlider' ),
tandem: options.tandem.createTandem( 'wavelengthNumberControl' ),
visiblePropertyOptions: { phetioReadOnly: true }
} );

Expand All @@ -124,7 +124,7 @@ class WavelengthPanel extends Panel {
maxWidth: 250
} ),
radioButtonGroup,
wavelengthSlider
wavelengthNumberControl
]
} );

Expand All @@ -137,8 +137,8 @@ class WavelengthPanel extends Panel {

// When the radio button selection changes...
light.modeProperty.link( mode => {
wavelengthSlider.interruptSubtreeInput();
wavelengthSlider.visible = ( mode === Light.Mode.VARIABLE );
wavelengthNumberControl.interruptSubtreeInput();
wavelengthNumberControl.visible = ( mode === Light.Mode.VARIABLE );
} );
}
}
Expand Down

0 comments on commit 6e92270

Please sign in to comment.