From 1fb6eafd2cd754631e236cdb7b36e04d416b0113 Mon Sep 17 00:00:00 2001 From: samreid Date: Fri, 26 Feb 2021 07:11:43 -0700 Subject: [PATCH] Apply Webstorm formatting, see https://github.com/phetsims/phet-info/issues/155 --- js/common/NaturalSelectionQueryParameters.js | 2 +- js/common/view/FastForwardButton.js | 4 +-- js/common/view/PlayButtonGroup.js | 38 ++++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) 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 ) {