Skip to content

Commit

Permalink
fixed Dialog.hide() as dispose, phetsims/joist#422 phetsims/phet-io#1136
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed May 18, 2017
1 parent 0b7de73 commit 2a2d4d1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions js/make-a-ten/game/view/MakeATenGameScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ define( function( require ) {
this.challengeLayer = new Node();

var showingLeftProperty = DerivedProperty.valueEquals( model.gameStateProperty,
new Property( GameState.CHOOSING_LEVEL ) );
new Property( GameState.CHOOSING_LEVEL ) );
this.addChild( new SlidingScreen( this.levelSelectionLayer,
this.challengeLayer,
this.visibleBoundsProperty,
showingLeftProperty ) );
this.challengeLayer,
this.visibleBoundsProperty,
showingLeftProperty ) );

// @private {StartGameLevelNode} - Shows buttons that allow selecting the level to play
this.startGameLevelNode = new StartGameLevelNode( model );
Expand All @@ -68,9 +68,6 @@ define( function( require ) {
this.resetAllButton.detach();
this.levelSelectionLayer.addChild( this.resetAllButton );

// created lazily
var infoDialog = null;

// @private {RectangularPushButton} - Shows '?' in the corner that pops up the info dialog when clicked.
this.infoButton = new RectangularPushButton( {
touchAreaXDilation: 7,
Expand All @@ -80,10 +77,7 @@ define( function( require ) {
} ),
baseColor: '#eeeeee',
listener: function() {
if ( !infoDialog ) {
infoDialog = new InfoDialog( model.levels );
}
infoDialog.show();
new InfoDialog( model.levels ).show();
},
top: this.layoutBounds.top + 20,
right: this.layoutBounds.right - 20
Expand Down

0 comments on commit 2a2d4d1

Please sign in to comment.