Skip to content

Commit

Permalink
TODO #28
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 15, 2023
1 parent fafaa25 commit 3d45776
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions js/common/model/CountingPlayArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class CountingPlayArea extends CountingCommonModel {
targetScale: scale
} );

// TODO: This is kind of a band-aid to keep the grouped objects' handles from sticking out of the top of the play https://github.com/phetsims/number-suite-common/issues/24
//TODO https://github.com/phetsims/number-suite-common/issues/28 This is kind of a band-aid to keep the grouped objects' handles from sticking out of the top of the play
// area since they are not yet included in countingObject.localBounds above without a view created
const playAreaBoundsMinY = this.groupingEnabledProperty.value ? 30 : 0;

Expand All @@ -172,7 +172,7 @@ class CountingPlayArea extends CountingCommonModel {
.withMaxY( this.playAreaBoundsProperty.value.maxY - this.countingObjectCreatorNodeHeight );
const countingObjectOriginBounds = countingObject.getOriginBounds( playAreaBounds );

// TODO: this algorithm does not take into account paper numbers that are on their way to a spot, and should https://github.com/phetsims/number-suite-common/issues/24
//TODO https://github.com/phetsims/number-suite-common/issues/28 this algorithm does not take into account paper numbers that are on their way to a spot, and should
// be rewritten to be better and accommodate that constraint
// looks for positions that are not overlapping with other playObjects in the play area
while ( !destinationPosition ) {
Expand Down Expand Up @@ -211,8 +211,8 @@ class CountingPlayArea extends CountingCommonModel {
/**
* Finds the closest countingObject to their origin and animates it back over the bucket. If only countingObjects with
* values greater than one exist, break them up and send their components with values of one back.
* TODO: Rename to something that indicates finding closest paper number to return https://github.com/phetsims/number-suite-common/issues/24
*/
//TODO https://github.com/phetsims/number-suite-common/issues/28 Rename to something that indicates finding closest paper number to return
public returnCountingObjectToBucket(): void {
assert && assert( this.countingObjects.lengthProperty.value > 0, 'countingObjects should exist in play area' );
assert && assert( this.initialized, 'returnCountingObjectToBucket called before initialization' );
Expand Down Expand Up @@ -332,7 +332,8 @@ class CountingPlayArea extends CountingCommonModel {
const numberOfColumns = 5; // rows
const numberOfRows = this.sumProperty.range.max / numberOfColumns;

const xMargin = 88; // empirically determined to center group TODO: figure out why math isn't working for this https://github.com/phetsims/number-suite-common/issues/24
//TODO https://github.com/phetsims/number-suite-common/issues/28 figure out why math isn't working for this
const xMargin = 88; // empirically determined to center group
const yMargin = CountingCommonConstants.COUNTING_PLAY_AREA_MARGIN;

const spots = [];
Expand Down Expand Up @@ -387,7 +388,7 @@ class CountingPlayArea extends CountingCommonModel {
*/
public breakApartCountingObjects( stack = false ): void {

// TODO: cleanup and doc https://github.com/phetsims/number-suite-common/issues/24
//TODO https://github.com/phetsims/number-suite-common/issues/28 cleanup and doc

const objectsToBreakDown = this.getCountingObjectsIncludedInSum();
const startingCount = _.sum( objectsToBreakDown.map( x => x.numberValueProperty.value ) );
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/NumberSuiteCommonPreferencesNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default abstract class NumberSuiteCommonPreferencesNode<T extends NumberS
controlNode: showSecondLocaleToggleSwitch
} );

// TODO: factor out this string if we like this, https://github.com/phetsims/number-suite-common/issues/26
//TODO https://github.com/phetsims/number-suite-common/issues/28 factor out this string if we like this
const loadAllHtmlText = new RichText(
'To display a second language, run the <a href="{{url}}">“all” version</a> of Number Play.', {
font: new PhetFont( 12 ),
Expand Down
4 changes: 2 additions & 2 deletions js/lab/view/LabScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class LabScreenView<T extends NumberSuiteCommonPreferences> extends ScreenView {
this.pieceLayer = new Node();
const backgroundDragTargetNode = new Rectangle( this.layoutBounds ); // see CountingPlayAreaNode for doc

// TODO: make file constants?
//TODO https://github.com/phetsims/number-suite-common/issues/28 make file constants?
const tenFrameCreatorPanelLeft = 143;
const creatorNodeSpacing = 18;

Expand Down Expand Up @@ -205,7 +205,7 @@ class LabScreenView<T extends NumberSuiteCommonPreferences> extends ScreenView {

this.tenFrameNodes = [];

// TODO: rename to addTenFrameNode and removeTenFrameNode
//TODO https://github.com/phetsims/number-suite-common/issues/28 rename to addTenFrameNode and removeTenFrameNode
model.tenFrames.addItemAddedListener( this.addTenFrame.bind( this ) );
model.tenFrames.addItemRemovedListener( this.removeTenFrame.bind( this ) );

Expand Down

0 comments on commit 3d45776

Please sign in to comment.