Skip to content

Commit

Permalink
Update stringPattern for masses-and-springs-basics-1.0 branch. #344
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Mar 13, 2019
1 parent 9697eb9 commit 2a7251f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/common/view/GravityAndDampingControlNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ define( function( require ) {
var NumberControl = require( 'SCENERY_PHET/NumberControl' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var SunConstants = require( 'SUN/SunConstants' );
var Text = require( 'SCENERY/nodes/Text' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
Expand Down Expand Up @@ -127,7 +128,7 @@ define( function( require ) {
}
} ),
valuePattern: StringUtils.fillIn( gravityValueString, {
gravity: '{0}'
gravity: SunConstants.VALUE_NAMED_PLACEHOLDER
} ),
valueFont: new PhetFont( { size: 14 } ),
useRichText: true,
Expand Down
3 changes: 2 additions & 1 deletion js/common/view/MassValueControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define( function( require ) {
var MassesAndSpringsConstants = require( 'MASSES_AND_SPRINGS/common/MassesAndSpringsConstants' );
var Node = require( 'SCENERY/nodes/Node' );
var NumberControl = require( 'SCENERY_PHET/NumberControl' );
var SunConstants = require( 'SUN/SunConstants' );
var Panel = require( 'SUN/Panel' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Property = require( 'AXON/Property' );
Expand Down Expand Up @@ -64,7 +65,7 @@ define( function( require ) {
} );

var trackSizeProperty = new Property( options.basics ? new Dimension2( 132, 0.1 ) : new Dimension2( 125, 0.1 ) );
var valuePattern = StringUtils.fillIn( massValueString, { mass: '{0}' }, {
var valuePattern = StringUtils.fillIn( massValueString, { mass: SunConstants.VALUE_NAMED_PLACEHOLDER }, {
font: new PhetFont( { size: 14, weight: 'bold' } )
} );
var numberControl = new NumberControl( massString, massInGramsProperty, range, {
Expand Down

0 comments on commit 2a7251f

Please sign in to comment.