Skip to content

Commit

Permalink
Cleaned up unused parameters. #253
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Mar 13, 2018
1 parent 5b24bc1 commit fa5dc1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions js/common/model/MassesAndSpringsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ define( function( require ) {
* @param {string} color - color of the MassNode
* @param {string} specifiedLabel - customized label for the MassNode
* @param {Tandem} tandem
* @param {Object} [options]
*/
createMass: function( mass, xPosition, color, specifiedLabel, tandem ) {
this.masses.push( new Mass( mass, xPosition, true, color, this.gravityProperty, tandem ) );
Expand Down Expand Up @@ -287,10 +286,9 @@ define( function( require ) {
* Based on new dragged position of mass, try to attach or detach mass if eligible and then update position.
*
* @param {Mass} mass
* @param {Bounds2} visibleBounds - visible bounds of the sim screen
* @public
*/
adjustDraggedMassPosition: function( mass, visibleBounds ) {
adjustDraggedMassPosition: function( mass ) {
var massPosition = mass.positionProperty.get();

// Attempt to detach
Expand All @@ -315,7 +313,6 @@ define( function( require ) {
-( mass.springProperty.get().positionProperty.get().y -
mass.springProperty.get().naturalRestingLengthProperty.get() ) +
massPosition.y - mass.hookHeight / 2 );
// debugger; REVIEW: Comments like these should be removed

// Maximum y value the spring should be able to contract based on the thickness and amount of spring coils.
var maxY = mass.springProperty.get().thicknessProperty.get() *
Expand Down
3 changes: 1 addition & 2 deletions js/common/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ define( function( require ) {

if ( mass.positionProperty.value.y < minY && !mass.springProperty.value ) {
mass.positionProperty.set( new Vector2( mass.positionProperty.value.x, minY ) );
// model.adjustDraggedMassPosition( self.mass, dragBoundsProperty.value );
}
} );
//REVIEW: Only usage is a read, can this be removed (such that it is always enabled, presumably?)
Expand Down Expand Up @@ -167,7 +166,7 @@ define( function( require ) {
}

// Checks if mass should be attached/detached to spring and adjusts its position if so.
model.adjustDraggedMassPosition( self.mass, dragBoundsProperty.value );
model.adjustDraggedMassPosition( self.mass );
},
startDrag: function() {
mass.userControlledProperty.set( true );
Expand Down

0 comments on commit fa5dc1d

Please sign in to comment.