Skip to content

Commit

Permalink
Factoring out valueChangeSoundGenerator for future work, see phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Mar 23, 2023
1 parent 7259258 commit 1da4406
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/view/SolarSystemCommonNumberControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export default class SolarSystemCommonNumberControl extends NumberControl {
middleMovingUpPlaybackRateMapper: playbackRateMapper
};

const valueChangeSoundGenerator = new ValueChangeSoundPlayer( range, valueChangeSoundGeneratorOptions );

const options = optionize<SolarSystemCommonNumberControlOptions, SelfOptions, NumberControlOptions>()( {
sliderOptions: {
trackSize: new Dimension2( 226, 2 ),
Expand All @@ -62,7 +64,7 @@ export default class SolarSystemCommonNumberControl extends NumberControl {
thumbCenterLineStroke: 'black',
trackFillEnabled: SolarSystemCommonColors.foregroundProperty,
trackStroke: SolarSystemCommonColors.foregroundProperty,
soundGenerator: new ValueChangeSoundPlayer( range, valueChangeSoundGeneratorOptions ),
soundGenerator: valueChangeSoundGenerator,

//a11y
accessibleName: SolarSystemCommonStrings.a11y.massSliderStringProperty
Expand Down

0 comments on commit 1da4406

Please sign in to comment.