Skip to content

Commit

Permalink
Addressing REVIEW: this.backLayer used for z-ordering of elements in …
Browse files Browse the repository at this point in the history
…LabScreenView. #48
  • Loading branch information
Denz1994 committed Jan 23, 2019
1 parent ffde20b commit 6f82d6d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/lab/view/LabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define( require => {
const MassesAndSpringsColorProfile = require( 'MASSES_AND_SPRINGS/common/view/MassesAndSpringsColorProfile' );
const MassesAndSpringsConstants = require( 'MASSES_AND_SPRINGS/common/MassesAndSpringsConstants' );
const MassValueControlPanel = require( 'MASSES_AND_SPRINGS/common/view/MassValueControlPanel' );
const Node = require( 'SCENERY/nodes/Node' );
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' );
Expand Down Expand Up @@ -143,10 +144,10 @@ define( require => {
center: this.massEquilibriumLineNode.center
} );

// Move layers with interactive elements to the front
this.movableLineNode.moveToFront();
this.massLayer.moveToFront();
this.toolsLayer.moveToFront();
// Layer used to move interactive elements to the front
const frontLayer = new Node( { children: [ this.movableLineNode, this.massLayer, this.toolsLayer ] } );
this.addChild( frontLayer );
frontLayer.moveToFront();

// Back layer used to handle z order of view elements.
this.addChild( this.backLayer );
Expand Down

0 comments on commit 6f82d6d

Please sign in to comment.