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 cac9663 commit bcab176
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions js/atomic-interactions/model/DualAtomModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SLOW_MOTION_TIME_MULTIPLIER = 0.5;
const MAX_TIME_STEP = 0.005; // in seconds

// valid values in reduced usage scenario
const VALID_ATOM_PAIRS_FOR_REDUCED = [AtomPair.NEON_NEON, AtomPair.ARGON_ARGON, AtomPair.ADJUSTABLE];
const VALID_ATOM_PAIRS_FOR_REDUCED = [ AtomPair.NEON_NEON, AtomPair.ARGON_ARGON, AtomPair.ADJUSTABLE ];

// threshold used for limiting force to zero to prevent jitter, empirically determined
const MIN_FORCE_JITTER_THRESHOLD = 1e-30;
Expand Down Expand Up @@ -76,7 +76,7 @@ class DualAtomModel {

// @public (read-write) - speed at which the model is running
this.timeSpeedProperty = new EnumerationProperty( TimeSpeed, TimeSpeed.NORMAL, {
validValues: [TimeSpeed.NORMAL, TimeSpeed.SLOW],
validValues: [ TimeSpeed.NORMAL, TimeSpeed.SLOW ],
tandem: tandem.createTandem( 'timeSpeedProperty' )
} );

Expand Down Expand Up @@ -145,7 +145,7 @@ class DualAtomModel {

// update the LJ potential parameters when the adjustable attraction atom is in use
Property.multilink(
[this.atomPairProperty, this.adjustableAtomInteractionStrengthProperty, this.adjustableAtomDiameterProperty],
[ this.atomPairProperty, this.adjustableAtomInteractionStrengthProperty, this.adjustableAtomDiameterProperty ],
( atomPair, interactionStrength, atomDiameter ) => {
if ( atomPair === AtomPair.ADJUSTABLE ) {
this.setEpsilon( interactionStrength );
Expand Down
2 changes: 1 addition & 1 deletion js/atomic-interactions/model/ForceDisplayMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
import Enumeration from '../../../../phet-core/js/Enumeration.js';
import statesOfMatter from '../../statesOfMatter.js';

const ForceDisplayMode = Enumeration.byKeys( ['COMPONENTS', 'TOTAL', 'HIDDEN'] );
const ForceDisplayMode = Enumeration.byKeys( [ 'COMPONENTS', 'TOTAL', 'HIDDEN' ] );
statesOfMatter.register( 'ForceDisplayMode', ForceDisplayMode );
export default ForceDisplayMode;
20 changes: 10 additions & 10 deletions js/atomic-interactions/view/ForcesAccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class ForcesAccordionBox extends AccordionBox {
};

// compute the maximum item width
const widestItem = _.maxBy( [hideForcesText, totalForceText, attractiveText, vanderwaalsText, repulsiveText,
electronOverlapText], item => {
const widestItem = _.maxBy( [ hideForcesText, totalForceText, attractiveText, vanderwaalsText, repulsiveText,
electronOverlapText ], item => {
return item.label.width + ( ( item.icon ) ? item.icon.width + ICON_PADDING : 0 );
} );
const maxWidth = widestItem.label.width + ( ( widestItem.icon ) ? widestItem.icon.width + ICON_PADDING : 0 );
Expand All @@ -143,10 +143,10 @@ class ForcesAccordionBox extends AccordionBox {
const createConsistentlySpacedLabel = labelSpec => {
if ( labelSpec.icon ) {
const strutWidth = maxWidth - labelSpec.label.width - labelSpec.icon.width;
return new HBox( { children: [labelSpec.label, new HStrut( strutWidth ), labelSpec.icon] } );
return new HBox( { children: [ labelSpec.label, new HStrut( strutWidth ), labelSpec.icon ] } );
}
else {
return new HBox( { children: [labelSpec.label] } );
return new HBox( { children: [ labelSpec.label ] } );
}
};

Expand All @@ -156,7 +156,7 @@ class ForcesAccordionBox extends AccordionBox {
createConsistentlySpacedLabel( attractiveText ),
createConsistentlySpacedLabel( vanderwaalsText ),
createConsistentlySpacedLabel( repulsiveText ),
createConsistentlySpacedLabel( electronOverlapText )],
createConsistentlySpacedLabel( electronOverlapText ) ],
align: 'left'
} );

Expand All @@ -178,17 +178,17 @@ class ForcesAccordionBox extends AccordionBox {
const bracketToTextSpacing = 2;
const componentForce = new HBox( {
spacing: bracketToTextSpacing,
children: [bracket, componentForceText]
children: [ bracket, componentForceText ]
} );
const totalForceStrutWidth = maxWidth - totalForceText.label.width - totalForceText.icon.width + bracket.width + bracketToTextSpacing;
const totalForceItem = new HBox( {
children: [totalForceText.label,
children: [ totalForceText.label,
new HStrut( totalForceStrutWidth ),
totalForceText.icon]
totalForceText.icon ]
} );

const totalForce = new HBox( { spacing: 2, children: [totalForceItem] } );
const hideForce = new HBox( { spacing: 2, children: [createConsistentlySpacedLabel( hideForcesText )] } );
const totalForce = new HBox( { spacing: 2, children: [ totalForceItem ] } );
const hideForce = new HBox( { spacing: 2, children: [ createConsistentlySpacedLabel( hideForcesText ) ] } );

const radioButtonGroup = new AquaRadioButtonGroup(
forcesProperty,
Expand Down
2 changes: 1 addition & 1 deletion js/atomic-interactions/view/PositionMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PositionMarker extends Node {
super( {
children: [ haloNode, sphereNode ],
tandem: options.tandem,
pickablePropertyPhetioInstrumented:true
pickablePropertyPhetioInstrumented: true
} );

// @private
Expand Down
8 changes: 4 additions & 4 deletions js/atomic-interactions/view/ZoomableGridNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class ZoomableGridNode extends Node {
atomsView.drawPotentialCurve();
},
baseColor: '#FFD333',
magnifyingGlassOptions:{
glassRadius:8
magnifyingGlassOptions: {
glassRadius: 8
},
xMargin: 3,
yMargin: 3,
Expand All @@ -88,8 +88,8 @@ class ZoomableGridNode extends Node {
atomsView.drawPotentialCurve();
},
baseColor: '#FFD333',
magnifyingGlassOptions:{
glassRadius:8
magnifyingGlassOptions: {
glassRadius: 8
},
xMargin: 3,
yMargin: 3,
Expand Down
2 changes: 1 addition & 1 deletion js/common/PhaseStateEnum.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
import Enumeration from '../../../phet-core/js/Enumeration.js';
import statesOfMatter from '../statesOfMatter.js';

const PhaseStateEnum = Enumeration.byKeys( ['SOLID', 'LIQUID', 'GAS', 'UNKNOWN'] );
const PhaseStateEnum = Enumeration.byKeys( [ 'SOLID', 'LIQUID', 'GAS', 'UNKNOWN' ] );
statesOfMatter.register( 'PhaseStateEnum', PhaseStateEnum );
export default PhaseStateEnum;
2 changes: 1 addition & 1 deletion js/common/SubstanceType.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
import Enumeration from '../../../phet-core/js/Enumeration.js';
import statesOfMatter from '../statesOfMatter.js';

const SubstanceType = Enumeration.byKeys( ['NEON', 'ARGON', 'DIATOMIC_OXYGEN', 'WATER', 'ADJUSTABLE_ATOM'] );
const SubstanceType = Enumeration.byKeys( [ 'NEON', 'ARGON', 'DIATOMIC_OXYGEN', 'WATER', 'ADJUSTABLE_ATOM' ] );
statesOfMatter.register( 'SubstanceType', SubstanceType );
export default SubstanceType;
2 changes: 1 addition & 1 deletion js/common/model/AtomType.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Enumeration from '../../../../phet-core/js/Enumeration.js';
import statesOfMatter from '../../statesOfMatter.js';

const AtomType = Enumeration.byKeys( ['NEON', 'ARGON', 'OXYGEN', 'HYDROGEN', 'ADJUSTABLE'] );
const AtomType = Enumeration.byKeys( [ 'NEON', 'ARGON', 'OXYGEN', 'HYDROGEN', 'ADJUSTABLE' ] );

statesOfMatter.register( 'AtomType', AtomType );
export default AtomType;
4 changes: 2 additions & 2 deletions js/common/view/AtomAndMoleculeIconFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const AtomAndMoleculeIconFactory = {
case SubstanceType.DIATOMIC_OXYGEN:
var oxygen1 = new Circle( 5, { fill: SOMConstants.OXYGEN_COLOR } );
var oxygen2 = new Circle( 5, { fill: SOMConstants.OXYGEN_COLOR, left: oxygen1.right - 4 } );
icon = new Node( { children: [oxygen1, oxygen2] } );
icon = new Node( { children: [ oxygen1, oxygen2 ] } );
break;

case SubstanceType.WATER:
Expand All @@ -46,7 +46,7 @@ const AtomAndMoleculeIconFactory = {
fill: SOMConstants.HYDROGEN_COLOR,
stroke: SOMConstants.HYDROGEN_COLOR, bottom: waterOxygen.top + 5, left: waterOxygen.right - 5
} );
icon = new Node( { children: [waterHydrogen2, waterOxygen, waterHydrogen1] } );
icon = new Node( { children: [ waterHydrogen2, waterOxygen, waterHydrogen1 ] } );
break;

default:
Expand Down
6 changes: 3 additions & 3 deletions js/common/view/CompositeThermometerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const CELSIUS_TEMPERATURE_RANGE = new Range(
const TEMPERATURE_READOUT_FONT = new PhetFont( 11 );

// local enum
const TemperatureUnits = Enumeration.byKeys( ['KELVIN', 'CELSIUS'] );
const TemperatureUnits = Enumeration.byKeys( [ 'KELVIN', 'CELSIUS' ] );

// clamping the red mercury display at 1000
const MAX_TEMPERATURE_TO_CLAMP_RED_MERCURY = 1000;
Expand Down Expand Up @@ -88,7 +88,7 @@ class CompositeThermometerNode extends Node {

// Property that contains the temperature in degrees Celsius
const temperatureInCelsiusProperty = new DerivedProperty(
[multipleParticleModel.temperatureInKelvinProperty],
[ multipleParticleModel.temperatureInKelvinProperty ],
temperatureInKelvin => temperatureInKelvin === null ? null : kelvinToCelsius( temperatureInKelvin )
);

Expand Down Expand Up @@ -130,7 +130,7 @@ class CompositeThermometerNode extends Node {

this.addChild( new VBox( {
spacing: 10,
children: [temperatureComboBoxDisplay, thermometerNode],
children: [ temperatureComboBoxDisplay, thermometerNode ],
resize: false
} ) );
this.addChild( comboBoxListParent );
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/DialGaugeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class DialGaugeNode extends Node {
connectorCollar.centerY = gaugeNode.centerY;
connectorCollar.left = gaugeNode.right - 10;
const dialComponentsNode = new Node( {
children: [connector, connectorCollar, gaugeNode, readoutNode]
children: [ connector, connectorCollar, gaugeNode, readoutNode ]
}
);

Expand Down
2 changes: 1 addition & 1 deletion js/common/view/GlobalOptionsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GlobalOptionsNode extends VBox {

// VBox is used to make it easy to add additional options
super( {
children: [projectorModeCheckbox],
children: [ projectorModeCheckbox ],
spacing: OptionsDialog.DEFAULT_SPACING,
align: 'left'
} );
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/PointingHandNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class PointingHandNode extends Node {
pointingHandImageNode.scale( WIDTH / pointingHandImageNode.width );

const hintNode = new Node( {
children: [upArrowNode, downArrowNode],
children: [ upArrowNode, downArrowNode ],
visible: false,
top: pointingHandImageNode.bottom - 50, // adjusted a bit for better look
left: pointingHandImageNode.right - 20 // adjusted a bit for better look
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/SOMColorProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import statesOfMatter from '../../statesOfMatter.js';
// constants
const GRAY = new Color( 230, 230, 230 );

const SOMColorProfile = new ColorProfile( ['default', 'projector'], {
const SOMColorProfile = new ColorProfile( [ 'default', 'projector' ], {
background: {
default: 'black',
projector: 'white'
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/SubstanceSelectorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SubstanceSelectorNode extends HBox {
stroke: Color.TRANSPARENT // it can be helpful during debugging to changes this to a visible color
} );
super( {
children: [label, spacer, icon]
children: [ label, spacer, icon ]
} );

// resize the spacer if the label size changes
Expand Down
2 changes: 1 addition & 1 deletion js/phase-changes/PhaseChangesModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PhaseChangesModel extends MultipleParticleModel {
} );

// @public (read-only) - a derived property that indicates whether the lid is higher than the injection point
this.lidAboveInjectionPointProperty = new DerivedProperty( [this.containerHeightProperty], containerHeight => {
this.lidAboveInjectionPointProperty = new DerivedProperty( [ this.containerHeightProperty ], containerHeight => {

// This may appear a little suspect, but the model is designed such that the container height is always reset
// to its max when the particle diameter and injection change, so this can be trusted.
Expand Down
2 changes: 1 addition & 1 deletion js/phase-changes/view/InteractionPotentialAccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class InteractionPotentialAccordionBox extends AccordionBox {
accordionContent.addChild( graph.interactionPotentialCanvasNode );
accordionContent.addChild( graph.ljPotentialGraph );

const accordionContentHBox = new HBox( { children: [accordionContent] } );
const accordionContentHBox = new HBox( { children: [ accordionContent ] } );
const titleNode = new Text( interactionPotentialString, {
fill: SOMColorProfile.controlPanelTextProperty,
font: new PhetFont( { size: 13 } )
Expand Down
4 changes: 2 additions & 2 deletions js/states/StatesIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class StatesIcon extends ScreenIcon {

// icons packed into a nice little box
const iconsBox = new HBox( {
children: [new Image( solidIconImage ), new Image( liquidIconImage ), new Image( gasIconImage )],
children: [ new Image( solidIconImage ), new Image( liquidIconImage ), new Image( gasIconImage ) ],
spacing: 20, // empirically determined
maxWidth: options.size.width,
centerX: options.size.width / 2,
Expand All @@ -43,7 +43,7 @@ class StatesIcon extends ScreenIcon {

const iconRootNode = new Rectangle( 0, 0, options.size.width, options.size.height, 0, 0, {
fill: Color.BLACK,
children: [iconsBox]
children: [ iconsBox ]
} );

super( iconRootNode, options );
Expand Down
4 changes: 2 additions & 2 deletions js/states/view/StatesMoleculesControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class StatesMoleculesControlPanel extends Node {
}
else {
return new HBox( {
children: [selectionNodeSpec.label]
children: [ selectionNodeSpec.label ]
} );
}
};
Expand Down Expand Up @@ -160,7 +160,7 @@ class StatesMoleculesControlPanel extends Node {

// create the background for the title - initial size is arbitrary, it will be sized and positioned below
const titleBackground = new Rectangle( 0, 0, 1, 1, { fill: options.fill } );
this.addChild( new Node( { children: [titleBackground, title] } ) );
this.addChild( new Node( { children: [ titleBackground, title ] } ) );

// closure for updating the title background size and overall position
const updateTitle = () => {
Expand Down
2 changes: 1 addition & 1 deletion js/states/view/StatesPhaseControlNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class StatesPhaseControlNode extends Node {

// put the buttons together in a single VBox
const buttons = new VBox( {
children: [solidStateButton, liquidStateButton, gasStateButton],
children: [ solidStateButton, liquidStateButton, gasStateButton ],
spacing: 10,
align: 'center'
} );
Expand Down
2 changes: 1 addition & 1 deletion js/states/view/StatesScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class StatesScreenView extends ScreenView {

// control when the heater/cooler node is enabled for input
Property.multilink(
[multipleParticleModel.isPlayingProperty, multipleParticleModel.isExplodedProperty],
[ multipleParticleModel.isPlayingProperty, multipleParticleModel.isExplodedProperty ],
( isPlaying, isExploded ) => {
if ( !isPlaying || isExploded ) {
heaterCoolerNode.interruptSubtreeInput(); // cancel interaction
Expand Down

0 comments on commit bcab176

Please sign in to comment.