Skip to content

Commit

Permalink
fixed REGULAR table row: Focus examples when focused sphere is at an …
Browse files Browse the repository at this point in the history
…edge and spheres are “touching”, phetsims/gravity-force-lab#124
  • Loading branch information
zepumph committed Feb 12, 2019
1 parent 9b48ccf commit 8794255
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 9 additions & 5 deletions js/gravity-force-lab-basics/model/GravityForceLabBasicsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ define( function( require ) {
tandem: tandem.createTandem( 'showDistanceProperty' )
} );

var baseColor1 = new Color( '#00f' );
var baseColor2 = new Color( '#f00' );

var leftBoundary = GravityForceLabBasicsConstants.LEFT_MASS_BOUNDARY;
var rightBoundary = GravityForceLabBasicsConstants.RIGHT_MASS_BOUNDARY;

Expand All @@ -60,8 +57,15 @@ define( function( require ) {
leftObjectBoundary: leftBoundary,
rightObjectBoundary: rightBoundary
};
var mass1 = new Mass( value1, position1, valueRange, density, this.constantRadiusProperty, baseColor1, tandem.createTandem( 'mass1' ), massOptions );
var mass2 = new Mass( value2, position2, valueRange, density, this.constantRadiusProperty, baseColor2, tandem.createTandem( 'mass2' ), massOptions );
var mass1 = new Mass( value1, position1, valueRange, density,
this.constantRadiusProperty, new Color( '#00f' ),
tandem.createTandem( 'mass1' ), massOptions
);

var mass2 = new Mass( value2, position2, valueRange, density,
this.constantRadiusProperty, new Color( '#f00' ),
tandem.createTandem( 'mass2' ), massOptions
);

ISLCModel.call( this, ISLCConstants.G, mass1, mass2, leftBoundary, rightBoundary, tandem, {
snapObjectsToNearest: GravityForceLabBasicsConstants.MASS_POSITION_DELTA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ define( function( require ) {
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var RadialGradient = require( 'SCENERY/util/RadialGradient' );
var Tandem = require( 'TANDEM/Tandem' );
// var Util = require( 'DOT/Util' );

// constants
var MASS_NODE_Y_POSITION = 215;
Expand Down

0 comments on commit 8794255

Please sign in to comment.