From d9941f323a7f57987ff3add994ef08733b342b41 Mon Sep 17 00:00:00 2001 From: denz1994 Date: Wed, 30 Jan 2019 11:51:27 -0500 Subject: [PATCH] Addressed REVIEW: Refactoring this.springNodes reference https://github.com/phetsims/masses-and-springs-basics/issues/48 --- js/common/view/SpringScreenView.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/common/view/SpringScreenView.js b/js/common/view/SpringScreenView.js index c0e07bf5..4e14e46b 100644 --- a/js/common/view/SpringScreenView.js +++ b/js/common/view/SpringScreenView.js @@ -84,9 +84,7 @@ define( function( require ) { this.springBackColorProperty = new PaintColorProperty( 'black' ); // @private {Array.} Used to reference the created springs in the view. - this.springNodes = []; - // REVIEW: Don't use `self`, and can we just combine this into the "declaration" above? - self.springNodes = model.springs.map( function( spring ) { + this.springNodes = model.springs.map( function( spring ) { var springNode = new MutableOptionsNode( OscillatingSpringNode, [ spring, self.modelViewTransform, tandem.createTandem( 'oscillatingSpringNode' ) ], { leftEndLength: -10 },