Skip to content

Commit

Permalink
Removed unused Property Charge.onRightHandSideOfLightBulbProperty, see
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 23, 2017
1 parent c557784 commit ff44ba5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions js/model/Charge.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ define( function( require ) {
// @public (read-only) {NumberProperty} - the angle of the charge (for showing arrows)
this.angleProperty = new NumberProperty( 0 );

// @public (read-only) {BooleanProperty} - true if the Charge is on the right hand side of a light bulb and hence
// must be layered in front of the socket node.
//REVIEW: I don't see where this is used (besides setting it). Can this be removed?
this.onRightHandSideOfLightBulbProperty = new BooleanProperty( false );

// When the distance or updating properties change, update the 2d position of the charge
//REVIEW: A multilink seems like overkill here, particularly since it's conditional. Furthermore, this looks like
//REVIEW: a function that should be a method (for performance and memory). Can we have an update() function or
Expand All @@ -87,12 +82,8 @@ define( function( require ) {
self.angleProperty.set( positionAndAngle.angle );
self.positionProperty.set( position );

//REVIEW: Presumably this can get removed, so that the non-assertion parts of the function can just be:
//REVIEW: Can the non-assertion parts of the function can just be:
//REVIEW: self.matrixProperty.set( self.circuitElement.getMatrix( distance ) );
self.onRightHandSideOfLightBulbProperty.set(
self.circuitElement instanceof LightBulb &&
self.distanceProperty.get() > self.circuitElement.chargePathLength / 2
);
}
} );

Expand Down

0 comments on commit ff44ba5

Please sign in to comment.