From ff44ba55dadddf9fd69b7f9100e7fa6431a86842 Mon Sep 17 00:00:00 2001 From: samreid Date: Tue, 22 Aug 2017 22:56:55 -0600 Subject: [PATCH] Removed unused Property Charge.onRightHandSideOfLightBulbProperty, see https://github.com/phetsims/circuit-construction-kit-common/issues/317 --- js/model/Charge.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/js/model/Charge.js b/js/model/Charge.js index 4694f891..32944605 100644 --- a/js/model/Charge.js +++ b/js/model/Charge.js @@ -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 @@ -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 - ); } } );