Skip to content

Commit

Permalink
lowercase "force vector" in min/max mass alert, phetsims/gravity-forc…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 11, 2019
1 parent b2c22b9 commit 1e36227
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
3 changes: 3 additions & 0 deletions js/ISLCA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ define( require => {
value: '{{forceVectorSize}}, and points directly at {{otherObjectLabel}}.'
},
forceVector: {
value: 'force vector'
},
forceVectorCapitalized: {
value: 'Force vector'
},
objectLabelPositionPattern: {
Expand Down
24 changes: 13 additions & 11 deletions js/view/describers/ForceDescriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ define( require => {
const forcesValueUnitsClausePatternString = ISLCA11yStrings.forcesValueUnitsClausePattern.value;
const forceMagnitudeString = ISLCA11yStrings.forceMagnitude.value;
const forceVectorString = ISLCA11yStrings.forceVector.value;
const forceVectorCapitalizedString = ISLCA11yStrings.forceVectorCapitalized.value;

const valuesInUnitsPatternString = ISLCA11yStrings.valuesInUnitsPattern.value;
const forcesInScientificNotationString = ISLCA11yStrings.forcesInScientificNotation.value;
Expand Down Expand Up @@ -123,6 +124,7 @@ define( require => {
vectorsString: vectorsString,
vectorsCapitalizedString: vectorsCapitalizedString,
forceVectorString: forceVectorString,
forceVectorCapitalizedString: forceVectorCapitalizedString,
forceMagnitudeString: forceMagnitudeString
}, options );

Expand All @@ -134,10 +136,12 @@ define( require => {
this.forceValueToString = options.forceValueToString;
this.convertForce = options.convertForce;

// @private {number} - // 1 -> growing, 0 -> no change, -1 -> shrinking
this.vectorChangeDirection = 0;
this.forceVectorsString = options.forceVectorsString;
this.vectorsCapitalizedString = options.vectorsCapitalizedString;
// @private
this.vectorChangeDirection = 0; // {number} - // 1 -> growing, 0 -> no change, -1 -> shrinking
this.forceVectorsString = options.forceVectorsString; // {string}
this.vectorsCapitalizedString = options.vectorsCapitalizedString; // {string}
this.forceVectorString = options.forceVectorString; // {string}
this.forceVectorCapitalizedString = options.forceVectorCapitalizedString; // {string}

// @protected
this.scientificNotationProperty = model.scientificNotationProperty;
Expand Down Expand Up @@ -167,9 +171,6 @@ define( require => {
this.forceVectorMagnitudeUnitsPatternString = StringUtils.fillIn( forceVectorMagnitudeUnitsPatternString, {
forceMagnitude: options.forceMagnitudeString
} );
this.forceVectorSizePatternString = StringUtils.fillIn( forceVectorSizePatternString, {
forceVector: options.forceVectorString
} );

model.forceProperty.link( ( force, oldForce ) => {
const forceDelta = force - oldForce;
Expand Down Expand Up @@ -234,9 +235,10 @@ define( require => {
* @public
* @returns {string}
*/
getForceVectorSize() {
return StringUtils.fillIn( this.forceVectorSizePatternString, {
size: this.getVectorSize()
getForceVectorSize( capitalized ) {
return StringUtils.fillIn( forceVectorSizePatternString, {
size: this.getVectorSize(),
forceVector: capitalized ? this.forceVectorCapitalizedString : this.forceVectorString
} );
}

Expand All @@ -250,7 +252,7 @@ define( require => {
return StringUtils.fillIn( forceAndVectorPatternString, {
thisObjectLabel: thisObjectLabel,
otherObjectLabel: otherObjectLabel,
forceVectorSize: this.getForceVectorSize()
forceVectorSize: this.getForceVectorSize( true )
} );
}

Expand Down

0 comments on commit 1e36227

Please sign in to comment.