Skip to content

Commit

Permalink
Use number suite common speech synthesis button, see: phetsims/number…
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Dec 11, 2024
1 parent b1f6c81 commit 346904b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/common/view/SpeechSynthesisButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ import optionize from '../../../../phet-core/js/optionize.js';
import PhetColorScheme from '../../../../scenery-phet/js/PhetColorScheme.js';
import { Color, Path } from '../../../../scenery/js/imports.js';
import bullhornSolidShape from '../../../../sherpa/js/fontawesome-5/bullhornSolidShape.js';
import RectangularPushButton from '../../../../sun/js/buttons/RectangularPushButton.js';
import RectangularPushButton, { RectangularPushButtonOptions } from '../../../../sun/js/buttons/RectangularPushButton.js';
import numberSuiteCommon from '../../numberSuiteCommon.js';
import NumberSuiteCommonConstants from '../NumberSuiteCommonConstants.js';
import NumberSuiteCommonSpeechSynthesisAnnouncer from './NumberSuiteCommonSpeechSynthesisAnnouncer.js';
import NumberSuiteCommonUtteranceQueue from './NumberSuiteCommonUtteranceQueue.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';

type SelfOptions = {
comparisonSignsAndTextVisibleProperty?: TReadOnlyProperty<boolean>;
};
export type SpeechSynthesisButtonOptions = SelfOptions;
export type SpeechSynthesisButtonOptions = SelfOptions & StrictOmit<RectangularPushButtonOptions, 'listener' | 'enabledProperty' | 'content'>;

// constants
const SIDE_LENGTH = NumberSuiteCommonConstants.BUTTON_LENGTH;
Expand All @@ -36,7 +37,7 @@ class SpeechSynthesisButton extends RectangularPushButton {
utteranceQueue: NumberSuiteCommonUtteranceQueue,
providedOptions?: SpeechSynthesisButtonOptions ) {

const options = optionize<SpeechSynthesisButtonOptions, SelfOptions>()( {
const options = optionize<SpeechSynthesisButtonOptions, SelfOptions, RectangularPushButtonOptions>()( {
comparisonSignsAndTextVisibleProperty: new BooleanProperty( true )
}, providedOptions );

Expand Down

0 comments on commit 346904b

Please sign in to comment.