Skip to content

Commit

Permalink
reuse dialog since hide no longer removes listeners, see phetsims/joi…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jul 12, 2017
1 parent 8c7447c commit 320a664
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/curve-fitting/view/DeviationsAccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ define( function( require ) {
// r^2 barometer
var barometerR2 = new BarometerR2Node( rSquaredProperty, curveVisibleProperty );

// informational dialog, created lazily because Dialog requires sim bounds during construction
var dialog = null;

// help button
var helpButton = new TextPushButton( symbolQuestionMarkString, {
listener: function() {
new ReducedChiSquaredStatisticDialog().show();
if ( !dialog ) {
dialog = new ReducedChiSquaredStatisticDialog();
}
dialog.show();
},
font: TEXT_FONT,
baseColor: 'rgb( 204, 204, 204 )',
Expand Down

0 comments on commit 320a664

Please sign in to comment.