Skip to content

Commit

Permalink
include sweater charge for balloon pickup when balloon on sweater, see
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Sep 13, 2017
1 parent 3ad4fde commit 9cf2b1a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/balloons-and-static-electricity/BASEA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ define( function( require ) {
//--------------------------------------------------------------------------
showAllGrabbedPatternString: '{{grabbed}}. {{location}}. {{charge}}. {{help}}',
showAllWithInducedGrabbedPatternString: '{{grabbed}}. {{location}}. {{charge}}. {{induced}}. {{help}}',
showAllOnSweaterGrabbedPatternString: '{{grabbed}}. {{location}}. {{charge}}. {{sweaterCharge}}. {{help}}',
showNoneGrabbedPatternString: '{{grabbed}}. {{location}}. {{help}}',
showDifferencesGrabbedPatternString: '{{grabbed}}. {{location}}. {{relativeCharge}}. {{help}}',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ define( function( require ) {
var balloonHasNegativeChargePatternString = BASEA11yStrings.balloonHasNegativeChargePatternString;
var lastChargePickedUpPatternString = BASEA11yStrings.lastChargePickedUpPatternString;
var showAllWithInducedGrabbedPatternString = BASEA11yStrings.showAllWithInducedGrabbedPatternString;
var showAllOnSweaterGrabbedPatternString = BASEA11yStrings.showAllOnSweaterGrabbedPatternString;

// constants
// maps balloon direction to a description string while the balloon is being dragged
Expand Down Expand Up @@ -491,6 +492,17 @@ define( function( require ) {
help: interactionCueString
} );
}
else if ( this.balloonModel.stickingToSweater() ) {
var sweaterCharge = this.model.sweater.chargeProperty.get();
var relativeSweaterCharge = SweaterDescriber.getRelativeChargeDescriptionWithLabel( sweaterCharge, chargesShown );
alertString = StringUtils.fillIn( showAllOnSweaterGrabbedPatternString, {
grabbed: grabbedString,
location: stateAndLocation,
charge: chargeString,
sweaterCharge: relativeSweaterCharge,
help: interactionCueString
} );
}
else {
alertString = StringUtils.fillIn( showAllGrabbedPatternString, {
grabbed: grabbedString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ define( function( require ) {

/**
* Get the relative charge on the sweater. Usually just returns the relative description
* from BalloonsAndStaticElectricity, but if all charges are gone, the sweater uses a special
* from BalloonsAndStaticElectricityDescriber, but if all charges are gone, the sweater uses a special
* word to indicate this.
*
* @param {number} charge
Expand Down

0 comments on commit 9cf2b1a

Please sign in to comment.