From fa5dc1dcb98a882a78354ea00db8d65cef16f51b Mon Sep 17 00:00:00 2001 From: denz1994 Date: Tue, 13 Mar 2018 14:01:11 -0400 Subject: [PATCH] Cleaned up unused parameters. #253 --- js/common/model/MassesAndSpringsModel.js | 5 +---- js/common/view/MassNode.js | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/js/common/model/MassesAndSpringsModel.js b/js/common/model/MassesAndSpringsModel.js index 7aca4c79..18b8ff24 100644 --- a/js/common/model/MassesAndSpringsModel.js +++ b/js/common/model/MassesAndSpringsModel.js @@ -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 ) ); @@ -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 @@ -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() * diff --git a/js/common/view/MassNode.js b/js/common/view/MassNode.js index 6d892fdc..6dd5f26f 100644 --- a/js/common/view/MassNode.js +++ b/js/common/view/MassNode.js @@ -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?) @@ -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 );