Skip to content

Commit

Permalink
update sphere positions help text in BASICS, see phetsims/gravity-for…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 27, 2019
1 parent 9b465f5 commit 8be2d0e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion js/ISLCA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ define( require => {
quantitativeAndQualitativePattern: {
value: '{{qualitativeClause}}{{quantitativeClause}}.'
},
qualitativeDistanceEachOtherPattern: {
value: '{{qualitativeDistance}} each other'
},
distanceAndValueSummaryPattern: {
value: '{{object1Label}} and {{object2Label}} are {{qualitativeDistance}} each other'
value: '{{object1Label}} and {{object2Label}} are {{qualitativeDistanceFromEachOther}}'
},
centersOfObjectsDistancePattern: {
value: 'Centers of {{objectsDistanceClause}}'
Expand Down
16 changes: 14 additions & 2 deletions js/view/describers/PositionDescriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define( require => {

const objectLabelPositionPatternString = ISLCA11yStrings.objectLabelPositionPattern.value; // [object] position
const distanceAndValueSummaryPatternString = ISLCA11yStrings.distanceAndValueSummaryPattern.value;
const qualitativeDistanceEachOtherPatternString = ISLCA11yStrings.qualitativeDistanceEachOtherPattern.value;
const centersExactlyPatternString = ISLCA11yStrings.centersExactlyPattern.value;
const quantitativeAndQualitativePatternString = ISLCA11yStrings.quantitativeAndQualitativePattern.value;
const centersOfObjectsDistancePatternString = ISLCA11yStrings.centersOfObjectsDistancePattern.value;
Expand Down Expand Up @@ -141,6 +142,17 @@ define( require => {
);
}

/**
* Like "close to each other" or "far from each other"
* @protected
* @returns {string}
*/
getQualitativeDistanceFromEachOther() {
return StringUtils.fillIn( qualitativeDistanceEachOtherPatternString, {
qualitativeDistance: this.qualitativeRelativeDistance()
} );
}

/**
* Returns the string used in the screen summary item displaying position/distance information:
* '{{object1Label}} and {{object2Label}} are {{qualitativeDistance}} each other, centers exactly {{distance}} {{units}} apart.'
Expand All @@ -157,7 +169,7 @@ define( require => {
{
object1Label: object1Label,
object2Label: object2Label,
qualitativeDistance: this.qualitativeRelativeDistance()
qualitativeDistanceFromEachOther: this.getQualitativeDistanceFromEachOther()
}
);
const quantitativeDistanceClause = StringUtils.fillIn(
Expand All @@ -181,7 +193,7 @@ define( require => {
}

/**
* @private
* @protected
* @returns {string}
*/
getDistanceAndUnits() {
Expand Down

0 comments on commit 8be2d0e

Please sign in to comment.