Skip to content

Commit

Permalink
Update TODOs, see #45
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 4, 2023
1 parent 51b7d00 commit 835bd39
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions js/common/model/CAVModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export type CAVModelOptions = SelfOptions;

export default class CAVModel {

// TODO: Some of these should move to subclasses
public readonly isShowingPlayAreaMedianProperty: BooleanProperty;
public readonly isShowingPlayAreaMeanProperty: BooleanProperty;
public readonly isShowingMedianPredictionProperty: BooleanProperty;
public readonly medianPredictionProperty: NumberProperty;
public readonly isShowingPlayAreaMedianProperty: BooleanProperty; // Screens 1-3

// TODO: Should some of these should move to subclasses?
public readonly isShowingPlayAreaMeanProperty: BooleanProperty; // Screens 2-3
public readonly isShowingMedianPredictionProperty: BooleanProperty; // Screens 1-2
public readonly medianPredictionProperty: NumberProperty; // Screens 1-2

public readonly selectedSceneModelProperty: Property<CAVSceneModel>;
public readonly soccerBallHasBeenDraggedProperty: Property<boolean>;
Expand Down
2 changes: 1 addition & 1 deletion js/common/model/CAVSceneModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TIME_BETWEEN_RAPID_KICKS = 0.5; // in seconds
export default class CAVSceneModel implements TModel {
public readonly soccerBalls: SoccerBall[];

// TODO: Document - is this the number active or number kicked?
// The number of active soccer balls (includes soccer balls created but not yet kicked)
public readonly soccerBallCountProperty: NumberProperty;

public readonly maxSoccerBalls = CAVConstants.NUMBER_OF_OBJECTS;
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/NumberLineNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class NumberLineNode extends Node {
}

// TODO: Can we make a 1d MVT since that's all that's needed here, or should this be using the same MVT as the outer MVT? Like the one that positions the number line node
// and puts objects in the right spots.
// and puts objects in the right spots. Related to https://github.com/phetsims/center-and-variability/issues/168
const modelViewTransform = ModelViewTransform2.createRectangleInvertedYMapping(
new Bounds2( CAVConstants.PHYSICAL_RANGE.min, 0, CAVConstants.PHYSICAL_RANGE.max, CAVConstants.PHYSICAL_RANGE.getLength() ),
new Bounds2( 0, -CAVConstants.CHART_VIEW_WIDTH, CAVConstants.CHART_VIEW_WIDTH, CAVConstants.CHART_VIEW_WIDTH )
Expand Down
3 changes: 2 additions & 1 deletion js/common/view/SceneView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default class SceneView {
soccerBall.valueProperty.link( ( value, oldValue ) => {

// If the value changed from numeric to numeric, it must have been by user dragging it.
// TODO: Wire up to the listener directly?
// It's simpler to have the listener here because in the model or drag listener, there is rounding/snapping
// And we only want to hide the indicator of the user dragged the ball a full tick mark
if ( oldValue !== null ) {
model.soccerBallHasBeenDraggedProperty.value = true;
}
Expand Down

0 comments on commit 835bd39

Please sign in to comment.