Skip to content

Commit

Permalink
Addressed REVIEW: Refactor "Shelf" to "ShelfNode" #48
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Jan 30, 2019
1 parent 4b76d75 commit 3adec77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions js/bounce/view/BounceScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions js/lab/view/LabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions js/stretch/view/StretchScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3adec77

Please sign in to comment.