Skip to content

Commit

Permalink
Simplify dialog hide/show, see phetsims/molecules-and-light#185
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 2, 2019
1 parent e2bae87 commit 505bccb
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions js/multiple-cells/view/FluorescentCellsPictureDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,34 +73,9 @@ define( function( require ) {
this.addInputListener( new ButtonListener( {
fire: self.hide.bind( self )
} ) );
this.shownProperty = new Property( false );

this.shownProperty.lazyLink( function( shown ) {
if ( shown ) {
Dialog.prototype.show.call( self );
}
else {
Dialog.prototype.hide.call( self );
}
} );
}

geneExpressionEssentials.register( 'FluorescentCellsPictureDialog', FluorescentCellsPictureDialog );

return inherit( Dialog, FluorescentCellsPictureDialog, {

/**
* @public
*/
hide: function() {
this.shownProperty.value = false;
},

/**
* @public
*/
show: function() {
this.shownProperty.value = true;
}
} );
return inherit( Dialog, FluorescentCellsPictureDialog );
} );

0 comments on commit 505bccb

Please sign in to comment.