From 4ec07381b5925bec41e3416f7a73e5ea5fc8713f Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 19 Sep 2019 14:24:51 -0800 Subject: [PATCH] var -> const using eslint auto fix, https://github.com/phetsims/tasks/issues/1012 --- js/equality-explorer-basics-main.js | 2 +- js/lab/LabScreen.js | 10 +++++----- js/lab/model/LabScene.js | 4 ++-- js/lab/view/LabSceneNode.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/equality-explorer-basics-main.js b/js/equality-explorer-basics-main.js index 515e12b..9d8ec06 100644 --- a/js/equality-explorer-basics-main.js +++ b/js/equality-explorer-basics-main.js @@ -19,7 +19,7 @@ define( require => { const equalityExplorerBasicsTitleString = require( 'string!EQUALITY_EXPLORER_BASICS/equality-explorer-basics.title' ); SimLauncher.launch( function() { - var sim = new Sim( equalityExplorerBasicsTitleString, [ new BasicsScreen(), new LabScreen() ], { + const sim = new Sim( equalityExplorerBasicsTitleString, [ new BasicsScreen(), new LabScreen() ], { credits: EqualityExplorerConstants.CREDITS } ); sim.start(); diff --git a/js/lab/LabScreen.js b/js/lab/LabScreen.js index ab695cc..5a0094c 100644 --- a/js/lab/LabScreen.js +++ b/js/lab/LabScreen.js @@ -32,7 +32,7 @@ define( require => { const screenLabString = require( 'string!EQUALITY_EXPLORER_BASICS/screen.lab' ); // constants - var BACKGROUND_COLOR = EqualityExplorerColors.BASICS_SCREEN_BACKGROUND; + const BACKGROUND_COLOR = EqualityExplorerColors.BASICS_SCREEN_BACKGROUND; /** * @param {Object} [options] @@ -60,19 +60,19 @@ define( require => { // Creates the icon for this screen: square = picker function createScreenIcon() { - var squareNode = new Image( squareImage, { + const squareNode = new Image( squareImage, { scale: 0.75 } ); - var equalsNode = new Text( MathSymbols.EQUAL_TO, { + const equalsNode = new Text( MathSymbols.EQUAL_TO, { font: new PhetFont( { size: 30, weight: 'bold' } ) } ); - var pickerNode = new NumberPicker( new Property( 7 ), new Property( new Range( 0, 10 ) ), { + const pickerNode = new NumberPicker( new Property( 7 ), new Property( new Range( 0, 10 ) ), { color: 'black' } ); - var iconNode = new HBox( { + const iconNode = new HBox( { spacing: 5, children: [ squareNode, equalsNode, pickerNode ] } ); diff --git a/js/lab/model/LabScene.js b/js/lab/model/LabScene.js index 5a8dc2c..429e2d6 100644 --- a/js/lab/model/LabScene.js +++ b/js/lab/model/LabScene.js @@ -24,14 +24,14 @@ define( require => { const triangleShadowImage = require( 'image!EQUALITY_EXPLORER_BASICS/triangleShadow.png' ); // constants - var VALUE_RANGE = new Range( 1, 20 ); + const VALUE_RANGE = new Range( 1, 20 ); /** * @constructor */ function LabScene() { - var variables = [ + const variables = [ // name, image, shadow new ObjectVariable( 'sphere', sphereImage, sphereShadowImage, { diff --git a/js/lab/view/LabSceneNode.js b/js/lab/view/LabSceneNode.js index 17fb76a..e89eb31 100644 --- a/js/lab/view/LabSceneNode.js +++ b/js/lab/view/LabSceneNode.js @@ -56,7 +56,7 @@ define( require => { snapshotsAccordionBoxExpandedProperty, layoutBounds, options ); // Values accordion box, above the Snapshots accordion box - var valuesAccordionBox = new VariablesAccordionBox( scene.variables, { + const valuesAccordionBox = new VariablesAccordionBox( scene.variables, { titleString: valuesString, expandedProperty: this.valuesAccordionBoxExpandedProperty, fixedWidth: this.snapshotsAccordionBox.width + 40, // wider so that pickers are usable size, see #3