From b498820370b61af2c8c230b1c4107812c6c6d0e2 Mon Sep 17 00:00:00 2001 From: Marla Schulz Date: Fri, 7 Jun 2024 10:33:43 -0700 Subject: [PATCH] Run code inspection, see: https://github.com/phetsims/mean-share-and-balance/issues/258 --- js/model/SoccerBall.ts | 2 +- js/model/SoccerBallValueProperty.ts | 1 + js/model/SoccerSceneModel.ts | 2 +- js/view/SoccerSceneView.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/model/SoccerBall.ts b/js/model/SoccerBall.ts index d52d929..d851070 100644 --- a/js/model/SoccerBall.ts +++ b/js/model/SoccerBall.ts @@ -33,7 +33,7 @@ let count = 0; export default class SoccerBall extends PhetioObject { /** - * Continuous value for the drag listener. When dragging, the object snaps to each tickmark. This is an implementation + * Continuous value for the drag listener. When dragging, the object snaps to each tick mark. This is an implementation * detail for the drag listener that is only used for deltas, and the absolute value does not matter. * Therefore, it should not be reset (because resetting it would take the model through an incorrect transient state). * diff --git a/js/model/SoccerBallValueProperty.ts b/js/model/SoccerBallValueProperty.ts index 76ee491..524f55c 100644 --- a/js/model/SoccerBallValueProperty.ts +++ b/js/model/SoccerBallValueProperty.ts @@ -30,6 +30,7 @@ export default class SoccerBallValueProperty extends Property { /** * @param value - The soccer ball's location on the number line. If the soccer ball has not yet landed, 'value' is null. + * @param providedOptions */ public constructor( value: number | null, providedOptions?: SoccerBallValuePropertyOptions ) { diff --git a/js/model/SoccerSceneModel.ts b/js/model/SoccerSceneModel.ts index 438afff..a1dc505 100644 --- a/js/model/SoccerSceneModel.ts +++ b/js/model/SoccerSceneModel.ts @@ -580,7 +580,7 @@ export default class SoccerSceneModel extends // Even number of values, average the two middle-most values const mid1Index = ( sortedObjects.length - 2 ) / 2; - const mid2Index = ( sortedObjects.length - 0 ) / 2; + const mid2Index = ( sortedObjects.length ) / 2; return [ sortedObjects[ mid1Index ], sortedObjects[ mid2Index ] ]; } else { diff --git a/js/view/SoccerSceneView.ts b/js/view/SoccerSceneView.ts index f0325a5..5eb522b 100644 --- a/js/view/SoccerSceneView.ts +++ b/js/view/SoccerSceneView.ts @@ -104,7 +104,7 @@ export default class SoccerSceneView { //when the ball is kicked