Skip to content

Commit

Permalink
support resetting of ariavaluetext creators, #134
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jun 11, 2019
1 parent 47e6831 commit caee362
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions js/gravity-force-lab-basics/view/GFLBScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ define( require => {
listener: () => {
model.reset();

// reset the view side (mostly a11y description related)
positionDescriber.reset();
mass1Node.reset();
mass2Node.reset();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ define( require => {
* @override
* @public
*/
getOnChangeAriaValueTextCreator( objectEnum ) {
getPositionAriaValueTextCreator( objectEnum ) {

// keep track of the previous value text
let previousText = '';

const superValueTextCreator = super.getOnChangeAriaValueTextCreator( objectEnum );
return () => {
const superValueTextCreator = super.getPositionAriaValueTextCreator( objectEnum );
const valueTextCreator = () => {


let newAriaValueText = superValueTextCreator();
Expand All @@ -71,6 +71,10 @@ define( require => {
previousText = newAriaValueText;
return newAriaValueText;
};

// pass through the reset function call
valueTextCreator.reset = () => { superValueTextCreator.reset()};
return valueTextCreator;
}

/**
Expand Down

0 comments on commit caee362

Please sign in to comment.