Skip to content

Commit

Permalink
screen buttons include HomeButton for centering, see #374
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Dec 7, 2016
1 parent c3f7dd1 commit fabc936
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/NavigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ define( function( require ) {

// For multi-screen sims ...
if ( this.screens.length !== 1 ) {
// screen buttons centered. The screen buttons are centered around the origin in the screenButtonsContainer, so
// the screenButtonsContainer can be put at x=center of the navbar
this.screenButtonsContainer.x = right / 2;
// screen buttons and home screen button are centered. The screen buttons are centered
// around the origin in the screenButtonsContainer, so the screenButtonsContainer can
// be put at the center of the navbar, shifted by the width of the home button
this.screenButtonsContainer.x = right / 2 + this.homeButton.width / 2;

// home button to the left of screen buttons
this.homeButton.right = this.screenButtonsContainer.left - HOME_BUTTON_RIGHT_MARGIN;
Expand Down

0 comments on commit fabc936

Please sign in to comment.