From 0c9be7dddf27f64673af4c2077fa1cb8b3d9c6a2 Mon Sep 17 00:00:00 2001 From: Jesse Date: Fri, 8 Nov 2019 12:44:11 -0500 Subject: [PATCH] fix bad-text for #140 --- js/energy-skate-park/common/model/EnergySkateParkModel.js | 4 ++-- js/energy-skate-park/common/model/Track.js | 2 +- .../common/view/EnergySkateParkControlPanel.js | 4 ++-- js/energy-skate-park/common/view/EnergySkateParkScreenView.js | 2 +- js/energy-skate-park/common/view/PieChartNode.js | 4 ++-- .../common/view/SceneSelectionRadioButtonGroup.js | 2 +- js/energy-skate-park/graphs/GraphsScreen.js | 4 ++-- js/energy-skate-park/intro/IntroScreen.js | 4 ++-- js/energy-skate-park/lab/LabScreen.js | 4 ++-- js/energy-skate-park/measure/MeasureScreen.js | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/js/energy-skate-park/common/model/EnergySkateParkModel.js b/js/energy-skate-park/common/model/EnergySkateParkModel.js index 0f892437..16b3853d 100644 --- a/js/energy-skate-park/common/model/EnergySkateParkModel.js +++ b/js/energy-skate-park/common/model/EnergySkateParkModel.js @@ -1736,13 +1736,13 @@ define( require => { // Get the number of physical control points (i.e. control points outside of the toolbox) getNumberOfPhysicalControlPoints() { const numberOfPointsInEachTrack = _.map( this.getPhysicalTracks(), track => {return track.controlPoints.length;} ); - return _.reduce( numberOfPointsInEachTrack, ( memo, num ) => { return memo + num; }, 0 ); + return _.reduce( numberOfPointsInEachTrack, ( memo, num ) => { memo + num; }, 0 ); } // Get the number of all control points for this model's tracks getNumberOfControlPoints() { const numberOfPointsInEachTrack = _.map( this.tracks.getArray(), track => {return track.controlPoints.length;} ); - return _.reduce( numberOfPointsInEachTrack, ( memo, num ) => { return memo + num; }, 0 ); + return _.reduce( numberOfPointsInEachTrack, ( memo, num ) => { memo + num; }, 0 ); } // Logic to determine whether a control point can be added by cutting a track's control point in two diff --git a/js/energy-skate-park/common/model/Track.js b/js/energy-skate-park/common/model/Track.js index 828ee11d..4f23188e 100644 --- a/js/energy-skate-park/common/model/Track.js +++ b/js/energy-skate-park/common/model/Track.js @@ -924,7 +924,7 @@ define( require => { } copyControlPointSources() { - return this.controlPoints.map( controlPoint => { return controlPoint.sourcePositionProperty.value.copy(); } ); + return this.controlPoints.map( controlPoint => { controlPoint.sourcePositionProperty.value.copy(); } ); } getDebugString() { diff --git a/js/energy-skate-park/common/view/EnergySkateParkControlPanel.js b/js/energy-skate-park/common/view/EnergySkateParkControlPanel.js index d21622f7..d2f2471d 100644 --- a/js/energy-skate-park/common/view/EnergySkateParkControlPanel.js +++ b/js/energy-skate-park/common/view/EnergySkateParkControlPanel.js @@ -27,7 +27,7 @@ define( require => { const VALID_CONTROLS = [ PhysicalSlider, PhysicalNumberControl, GravityComboBox, MassComboBox ]; class EnergySkateParkControlPanel extends Panel { - + /** * @param {EnergySkateParkModel} model * @param {EnergySkateParkScreenView} screenView @@ -59,7 +59,7 @@ define( require => { children.push( control ); } ); - const separatorWidth = _.maxBy( children, child => { return child.width; } ).width; + const separatorWidth = _.maxBy( children, child => { child.width; } ).width; children.splice( children.indexOf( controls[ 0 ] ), 0, new HSeparator( separatorWidth ) ); if ( screenView.showTrackButtons ) { children.splice( children.indexOf( visibilityControls ) + 1, 0, new HSeparator( separatorWidth ) ); diff --git a/js/energy-skate-park/common/view/EnergySkateParkScreenView.js b/js/energy-skate-park/common/view/EnergySkateParkScreenView.js index ed9dbbd4..58c89f3a 100644 --- a/js/energy-skate-park/common/view/EnergySkateParkScreenView.js +++ b/js/energy-skate-park/common/view/EnergySkateParkScreenView.js @@ -177,7 +177,7 @@ define( require => { // For the playground screen, show attach/detach toggle buttons if ( options.showAttachDetachRadioButtons ) { const property = model.tracksDraggable ? new Property( true ) : - new DerivedProperty( [ model.sceneProperty ], scene => { return scene === 2; } ); + new DerivedProperty( [ model.sceneProperty ], scene => { scene === 2; } ); this.attachDetachToggleButtons = new AttachDetachToggleButtons( model.stickingToTrackProperty, property, 150, tandem.createTandem( 'attachDetachToggleButtons' ) ); this.bottomLayer.addChild( this.attachDetachToggleButtons ); } diff --git a/js/energy-skate-park/common/view/PieChartNode.js b/js/energy-skate-park/common/view/PieChartNode.js index 7fc8962e..f5bb84a3 100644 --- a/js/energy-skate-park/common/view/PieChartNode.js +++ b/js/energy-skate-park/common/view/PieChartNode.js @@ -51,8 +51,8 @@ define( require => { } ); // Skip bounds computation to improve performance, see #245 - kineticEnergySlice.computeShapeBounds = () => { return new Bounds2( 0, 0, 0, 0 ); }; - potentialEnergySlice.computeShapeBounds = () => { return new Bounds2( 0, 0, 0, 0 ); }; + kineticEnergySlice.computeShapeBounds = () => new Bounds2( 0, 0, 0, 0 ); + potentialEnergySlice.computeShapeBounds = () => new Bounds2( 0, 0, 0, 0 ); // total energy representation is a full circle, so it can use the optimized version. const totalEnergyCircle = new Circle( 1, { diff --git a/js/energy-skate-park/common/view/SceneSelectionRadioButtonGroup.js b/js/energy-skate-park/common/view/SceneSelectionRadioButtonGroup.js index 4ee0a7c3..1378ef1f 100644 --- a/js/energy-skate-park/common/view/SceneSelectionRadioButtonGroup.js +++ b/js/energy-skate-park/common/view/SceneSelectionRadioButtonGroup.js @@ -87,7 +87,7 @@ define( require => { contents.push( contentNode ); } ); - const minWidth = _.minBy( contents, node => { return node.width; } ).width; + const minWidth = _.minBy( contents, node => { node.width; } ).width; const buttonAlignGroup = new AlignGroup(); diff --git a/js/energy-skate-park/graphs/GraphsScreen.js b/js/energy-skate-park/graphs/GraphsScreen.js index 639c0b01..6ca212b0 100644 --- a/js/energy-skate-park/graphs/GraphsScreen.js +++ b/js/energy-skate-park/graphs/GraphsScreen.js @@ -39,8 +39,8 @@ define( require => { }, options ); super( - () => { return new GraphsModel( tandem.createTandem( 'graphsModel' ) ); }, - model => { return new GraphsScreenView( model, tandem.createTandem( 'graphsScreenView' ) ); }, + () => new GraphsModel( tandem.createTandem( 'graphsModel' ) ), + model => new GraphsScreenView( model, tandem.createTandem( 'graphsScreenView' ) ), options ); } diff --git a/js/energy-skate-park/intro/IntroScreen.js b/js/energy-skate-park/intro/IntroScreen.js index 13c0f3f1..4c584e20 100644 --- a/js/energy-skate-park/intro/IntroScreen.js +++ b/js/energy-skate-park/intro/IntroScreen.js @@ -38,8 +38,8 @@ define( require => { }, options ); super( - () => { return new IntroModel( tandem.createTandem( 'model' ) ); }, - model => { return new IntroScreenView( model, tandem.createTandem( 'view' ) ); }, + () => new IntroModel( tandem.createTandem( 'model' ) ), + model => new IntroScreenView( model, tandem.createTandem( 'view' ) ), options ); diff --git a/js/energy-skate-park/lab/LabScreen.js b/js/energy-skate-park/lab/LabScreen.js index d08f53d6..62b3fee5 100644 --- a/js/energy-skate-park/lab/LabScreen.js +++ b/js/energy-skate-park/lab/LabScreen.js @@ -39,8 +39,8 @@ define( require => { }, options ); super( - () => { return new LabModel( tandem.createTandem( 'labModel' ) ); }, - model => { return new LabScreenView( model, tandem.createTandem( 'labScreenView' ) ); }, + () => new LabModel( tandem.createTandem( 'labModel' ) ), + model => new LabScreenView( model, tandem.createTandem( 'labScreenView' ) ), options ); } diff --git a/js/energy-skate-park/measure/MeasureScreen.js b/js/energy-skate-park/measure/MeasureScreen.js index dc2de2ef..ec0a70f3 100644 --- a/js/energy-skate-park/measure/MeasureScreen.js +++ b/js/energy-skate-park/measure/MeasureScreen.js @@ -39,8 +39,8 @@ define( require => { }; super( - () => { return new MeasureModel( tandem.createTandem( 'measureModel' ) ); }, - model => { return new MeasureScreenView( model, tandem.createTandem( 'measureScreenView' ) ); }, + () => new MeasureModel( tandem.createTandem( 'measureModel' ) ), + model => new MeasureScreenView( model, tandem.createTandem( 'measureScreenView' ) ), options );