Skip to content

Commit

Permalink
bug fix changing the variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
aadish committed Mar 11, 2016
1 parent da8848e commit 2fad827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/gravity-force-lab/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ define( function( require ) {
// for mass1 xMax is left boundary of
var sumRadius = modelViewTransform.modelToViewDeltaX( model.mass1.radius ) + modelViewTransform.modelToViewDeltaX( model.mass2.radius );
if ( massModel.position === model.mass1.position ) {
xMax = modelViewTransform.modelToViewX( model.mass2.position ) - sumRadius - modelViewTransform.modelToViewDeltaX( GravityForceLabModel.MinSeparationBetweenMasses );
xMax = modelViewTransform.modelToViewX( model.mass2.position ) - sumRadius - modelViewTransform.modelToViewDeltaX( GravityForceLabModel.MIN_SEPARATION_BETWEEN_MASSES );
}
if ( massModel.position === model.mass2.position ) {
xMin = modelViewTransform.modelToViewX( model.mass1.position ) + sumRadius + modelViewTransform.modelToViewDeltaX( GravityForceLabModel.MinSeparationBetweenMasses );
xMin = modelViewTransform.modelToViewX( model.mass1.position ) + sumRadius + modelViewTransform.modelToViewDeltaX( GravityForceLabModel.MIN_SEPARATION_BETWEEN_MASSES );
}
x = Math.max( Math.min( x, xMax ), xMin );
massModel.positionProperty.set( modelViewTransform.viewToModelX( x ) );
Expand Down

0 comments on commit 2fad827

Please sign in to comment.