Skip to content

Commit

Permalink
Apply Webstorm formatting, see phetsims/phet-info#155
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 26, 2021
1 parent a2ca8ff commit 1fb6eaf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion js/common/NaturalSelectionQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
},

Expand Down
4 changes: 2 additions & 2 deletions js/common/view/FastForwardButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions js/common/view/PlayButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 1fb6eaf

Please sign in to comment.