Skip to content

Commit

Permalink
update positionProperty range and documentation, #172
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 7, 2020
1 parent c270ec6 commit e670f4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions js/model/GravityForceLabModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ define( require => {
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// constants
const MASS_OPTIONS = {
leftObjectBoundary: GravityForceLabConstants.PULL_LOCATION_RANGE.min,
rightObjectBoundary: GravityForceLabConstants.PULL_LOCATION_RANGE.max
};

/**
* @param {Tandem} tandem
* @constructor
Expand Down Expand Up @@ -55,9 +61,9 @@ define( require => {
const density = 150; // in kg/m^3

const mass1 = new Mass( massValue1, position1, GravityForceLabConstants.MASS_RANGE, density,
this.constantRadiusProperty, baseColor1, tandem.createTandem( 'mass1' ) );
this.constantRadiusProperty, baseColor1, tandem.createTandem( 'mass1' ), MASS_OPTIONS );
const mass2 = new Mass( massValue2, position2, GravityForceLabConstants.MASS_RANGE, density,
this.constantRadiusProperty, baseColor2, tandem.createTandem( 'mass2' ) );
this.constantRadiusProperty, baseColor2, tandem.createTandem( 'mass2' ), MASS_OPTIONS );

// leverage ISLCModel, in "mass" mode
ISLCModel.call( this, PhysicalConstants.GRAVITATIONAL_CONSTANT, mass1, mass2,
Expand Down
4 changes: 2 additions & 2 deletions js/phet-io/gravity-force-lab-phet-io-elements-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<RangeIO>"
},
"gravityForceLab.gravityForceLabScreen.model.mass1.positionProperty": {
"phetioDocumentation": "The position of the object along the track, in meters.",
"phetioDocumentation": "The position of the object along the track, in meters. The origin is in the center between the two objects.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -1614,7 +1614,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<RangeIO>"
},
"gravityForceLab.gravityForceLabScreen.model.mass2.positionProperty": {
"phetioDocumentation": "The position of the object along the track, in meters.",
"phetioDocumentation": "The position of the object along the track, in meters. The origin is in the center between the two objects.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down

0 comments on commit e670f4e

Please sign in to comment.