Skip to content

Commit

Permalink
reusable public Utterance for a context response when constant size c…
Browse files Browse the repository at this point in the history
…heckbox changes, see #322
  • Loading branch information
jessegreenberg committed Apr 14, 2022
1 parent ea510d3 commit 4eb32fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/view/GFLBScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ScreenView from '../../../joist/js/ScreenView.js';
import StringUtils from '../../../phetcommon/js/util/StringUtils.js';
import ModelViewTransform2 from '../../../phetcommon/js/view/ModelViewTransform2.js';
import ResetAllButton from '../../../scenery-phet/js/buttons/ResetAllButton.js';
import { PDOMPeer } from '../../../scenery/js/imports.js';
import { PDOMPeer, Voicing } from '../../../scenery/js/imports.js';
import { HBox } from '../../../scenery/js/imports.js';
import { Node } from '../../../scenery/js/imports.js';
import { Color } from '../../../scenery/js/imports.js';
Expand Down Expand Up @@ -366,6 +366,10 @@ class GFLBScreenView extends ScreenView {
mass2Node
];

// voicing - Make sure that the Utterances from Alerters only announce when the content under this ScreenView
// is visible
Voicing.registerUtteranceToNode( alertManager.constantSizeChangedContextResponseUtterance, this );

// layout the view elements
parameterControlPanel.right = this.layoutBounds.width - 15;
parameterControlPanel.bottom = MASS_CONTROLS_Y_POSITION;
Expand Down

0 comments on commit 4eb32fb

Please sign in to comment.