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 ff9a98c commit 3ba3419
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions js/curve-fitting/view/DeviationsAccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,10 @@ define( function( require ) {
// r^2 barometer
var barometerR2 = new BarometerR2Node( rSquaredProperty, curveVisibleProperty );

// help dialog, created on demand
var helpDialog = null;

// help button
var helpButton = new TextPushButton( symbolQuestionMarkString, {
listener: function() {
if ( !helpDialog ) {
helpDialog = new ReducedChiSquaredStatisticDialog();
}
helpDialog.show();
new ReducedChiSquaredStatisticDialog().show();
},
font: TEXT_FONT,
baseColor: 'rgb( 204, 204, 204 )',
Expand Down Expand Up @@ -156,8 +150,8 @@ define( function( require ) {
rSquaredValueNode.setText( formatNumber( rSquared, 2 ) );
} );

curveVisibleProperty.linkAttribute(rSquaredValueNode, 'visible');
curveVisibleProperty.linkAttribute(chiSquaredValueNode, 'visible');
curveVisibleProperty.linkAttribute( rSquaredValueNode, 'visible' );
curveVisibleProperty.linkAttribute( chiSquaredValueNode, 'visible' );

AccordionBox.call( this, content, options );
}
Expand Down

0 comments on commit 3ba3419

Please sign in to comment.