diff --git a/js/common/NaturalSelectionQueryParameters.js b/js/common/NaturalSelectionQueryParameters.js index 3b630745..a8153d7f 100644 --- a/js/common/NaturalSelectionQueryParameters.js +++ b/js/common/NaturalSelectionQueryParameters.js @@ -213,7 +213,7 @@ const SCHEMA = { // Tuned in https://github.com/phetsims/natural-selection/issues/86 shortTeethMultiplier: { type: 'number', - defaultValue: 2 , + defaultValue: 2, isValidValue: value => ( value > 1 ) }, diff --git a/js/common/view/FastForwardButton.js b/js/common/view/FastForwardButton.js index 042f72cf..046b34e7 100644 --- a/js/common/view/FastForwardButton.js +++ b/js/common/view/FastForwardButton.js @@ -26,8 +26,8 @@ class FastForwardButton extends RoundMomentaryButton { options = merge( { radius: 16, - xMargin:8, - yMargin:8, + xMargin: 8, + yMargin: 8, // phet-io tandem: Tandem.REQUIRED diff --git a/js/common/view/PlayButtonGroup.js b/js/common/view/PlayButtonGroup.js index eca19c7f..bf57cf58 100644 --- a/js/common/view/PlayButtonGroup.js +++ b/js/common/view/PlayButtonGroup.js @@ -78,25 +78,25 @@ class PlayButtonGroup extends Node { // Make at most 1 button visible. unlink is not necessary. simulationModeProperty.link( simulationMode => { - // start with all buttons hidden - addAMateButton.visible = false; - playButton.visible = false; - startOverButton.visible = false; - - if ( simulationMode === SimulationMode.STAGED ) { - - // Show 'Add a Mate' or 'Play' button, depending on the size of the population. - // Make one of these buttons visible on the next frame, so that a double-click on the 'Start Over' button - // doesn't fire the button that is made visible. See https://github.com/phetsims/natural-selection/issues/166 - const bunnyCount = bunnyCountProperty.value; - stepTimer.runOnNextTick( () => { - - // Checking simulationModeProperty to make sure it hasn't changed again before this callback fires. - // See https://github.com/phetsims/natural-selection/issues/235 - if ( simulationModeProperty.value === SimulationMode.STAGED ) { - addAMateButton.visible = ( bunnyCount === 1 ); - playButton.visible = ( bunnyCount > 1 ); - } + // start with all buttons hidden + addAMateButton.visible = false; + playButton.visible = false; + startOverButton.visible = false; + + if ( simulationMode === SimulationMode.STAGED ) { + + // Show 'Add a Mate' or 'Play' button, depending on the size of the population. + // Make one of these buttons visible on the next frame, so that a double-click on the 'Start Over' button + // doesn't fire the button that is made visible. See https://github.com/phetsims/natural-selection/issues/166 + const bunnyCount = bunnyCountProperty.value; + stepTimer.runOnNextTick( () => { + + // Checking simulationModeProperty to make sure it hasn't changed again before this callback fires. + // See https://github.com/phetsims/natural-selection/issues/235 + if ( simulationModeProperty.value === SimulationMode.STAGED ) { + addAMateButton.visible = ( bunnyCount === 1 ); + playButton.visible = ( bunnyCount > 1 ); + } } ); } else if ( simulationMode === SimulationMode.ACTIVE ) {