Skip to content

Commit

Permalink
fix bad-text for #140
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Nov 8, 2019
1 parent 3ee2a19 commit 0c9be7d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions js/energy-skate-park/common/model/EnergySkateParkModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion js/energy-skate-park/common/model/Track.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define( require => {
const VALID_CONTROLS = [ PhysicalSlider, PhysicalNumberControl, GravityComboBox, MassComboBox ];

class EnergySkateParkControlPanel extends Panel {

/**
* @param {EnergySkateParkModel} model
* @param {EnergySkateParkScreenView} screenView
Expand Down Expand Up @@ -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 ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
4 changes: 2 additions & 2 deletions js/energy-skate-park/common/view/PieChartNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions js/energy-skate-park/graphs/GraphsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
4 changes: 2 additions & 2 deletions js/energy-skate-park/intro/IntroScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down
4 changes: 2 additions & 2 deletions js/energy-skate-park/lab/LabScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
4 changes: 2 additions & 2 deletions js/energy-skate-park/measure/MeasureScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down

0 comments on commit 0c9be7d

Please sign in to comment.