From 3adec77cf5100b7b87a8690907a29481373d3462 Mon Sep 17 00:00:00 2001 From: denz1994 Date: Wed, 30 Jan 2019 11:49:56 -0500 Subject: [PATCH] Addressed REVIEW: Refactor "Shelf" to "ShelfNode" https://github.com/phetsims/masses-and-springs-basics/issues/48 --- js/bounce/view/BounceScreenView.js | 6 +++--- js/lab/view/LabScreenView.js | 4 ++-- js/stretch/view/StretchScreenView.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/bounce/view/BounceScreenView.js b/js/bounce/view/BounceScreenView.js index 83abeec..6af6ab2 100644 --- a/js/bounce/view/BounceScreenView.js +++ b/js/bounce/view/BounceScreenView.js @@ -15,7 +15,7 @@ define( require => { const MassesAndSpringsColorProfile = require( 'MASSES_AND_SPRINGS/common/view/MassesAndSpringsColorProfile' ); const MassesAndSpringsConstants = require( 'MASSES_AND_SPRINGS/common/MassesAndSpringsConstants' ); const ReferenceLineNode = require( 'MASSES_AND_SPRINGS/common/view/ReferenceLineNode' ); - const Shelf = require( 'MASSES_AND_SPRINGS/common/view/Shelf' ); + const ShelfNode = require( 'MASSES_AND_SPRINGS/common/view/ShelfNode' ); const TwoSpringScreenView = require( 'MASSES_AND_SPRINGS/common/view/TwoSpringScreenView' ); const VBox = require( 'SCENERY/nodes/VBox' ); const Vector2 = require( 'DOT/Vector2' ); @@ -90,14 +90,14 @@ define( require => { // Shelves used for masses - const labeledMassesShelf = new Shelf( tandem, { + const labeledMassesShelf = new ShelfNode( tandem, { rectHeight: 7, rectWidth: 185, left: this.layoutBounds.left + this.spacing, rectY: this.modelViewTransform.modelToViewY( MassesAndSpringsConstants.FLOOR_Y ) - this.shelf.rectHeight } ); - const mysteryMassesShelf = new Shelf( tandem, { + const mysteryMassesShelf = new ShelfNode( tandem, { rectHeight: 7, rectWidth: 120, left: labeledMassesShelf.right + this.spacing * 2, diff --git a/js/lab/view/LabScreenView.js b/js/lab/view/LabScreenView.js index e590fe0..72c62c9 100644 --- a/js/lab/view/LabScreenView.js +++ b/js/lab/view/LabScreenView.js @@ -19,7 +19,7 @@ define( require => { const OneSpringScreenView = require( 'MASSES_AND_SPRINGS/common/view/OneSpringScreenView' ); const PeriodTraceNode = require( 'MASSES_AND_SPRINGS/lab/view/PeriodTraceNode' ); const ReferenceLineNode = require( 'MASSES_AND_SPRINGS/common/view/ReferenceLineNode' ); - const Shelf = require( 'MASSES_AND_SPRINGS/common/view/Shelf' ); + const ShelfNode = require( 'MASSES_AND_SPRINGS/common/view/ShelfNode' ); const Text = require( 'SCENERY/nodes/Text' ); const VBox = require( 'SCENERY/nodes/VBox' ); const Vector2 = require( 'DOT/Vector2' ); @@ -74,7 +74,7 @@ define( require => { } ); // Shelf used for masses - const shelf = new Shelf( tandem, { + const shelf = new ShelfNode( tandem, { rectHeight: 7, rectWidth: 200, left: this.visibleBoundsProperty.value.left + this.spacing, diff --git a/js/stretch/view/StretchScreenView.js b/js/stretch/view/StretchScreenView.js index 4fe1230..f066c1e 100644 --- a/js/stretch/view/StretchScreenView.js +++ b/js/stretch/view/StretchScreenView.js @@ -18,7 +18,7 @@ define( require => { const PaintColorProperty = require( 'SCENERY/util/PaintColorProperty' ); const Property = require( 'AXON/Property' ); const ReferenceLineNode = require( 'MASSES_AND_SPRINGS/common/view/ReferenceLineNode' ); - const Shelf = require( 'MASSES_AND_SPRINGS/common/view/Shelf' ); + const ShelfNode = require( 'MASSES_AND_SPRINGS/common/view/ShelfNode' ); const TwoSpringScreenView = require( 'MASSES_AND_SPRINGS/common/view/TwoSpringScreenView' ); const Vector2 = require( 'DOT/Vector2' ); @@ -90,14 +90,14 @@ define( require => { const optionsPanel = this.createOptionsPanel( lineOptionsPanel, this.rightPanelAlignGroup, tandem ); // Shelves used for masses - const labeledMassesShelf = new Shelf( tandem, { + const labeledMassesShelf = new ShelfNode( tandem, { rectHeight: 7, rectWidth: 185, left: this.layoutBounds.left + this.spacing, rectY: this.modelViewTransform.modelToViewY( MassesAndSpringsConstants.FLOOR_Y ) - this.shelf.rectHeight } ); - const mysteryMassesShelf = new Shelf( tandem, { + const mysteryMassesShelf = new ShelfNode( tandem, { rectHeight: 7, rectWidth: 120, left: labeledMassesShelf.right + this.spacing * 2,