From b5a924e7f1eaa1685778c2cc1850f5dddd582bd2 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Wed, 2 Aug 2023 14:36:04 -0600 Subject: [PATCH] remove TODOs, https://github.com/phetsims/shred/issues/38 --- js/AtomIdentifier.ts | 3 +-- js/model/Particle.ts | 2 -- js/model/ParticleAtom.ts | 2 -- js/view/ExpandedPeriodicTableNode.ts | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/js/AtomIdentifier.ts b/js/AtomIdentifier.ts index e96ec00..cfa80ca 100644 --- a/js/AtomIdentifier.ts +++ b/js/AtomIdentifier.ts @@ -14145,8 +14145,7 @@ const AtomIdentifier = { return false; } - // TODO: should not require jquery dependency, https://github.com/phetsims/shred/issues/38 - return $.inArray( numNeutrons, tableEntry ) > -1; + return tableEntry.includes( numNeutrons ); }, getNumNeutronsInMostCommonIsotope: function( atomicNumber: number ): number { diff --git a/js/model/Particle.ts b/js/model/Particle.ts index 691d491..42e6ca7 100644 --- a/js/model/Particle.ts +++ b/js/model/Particle.ts @@ -185,10 +185,8 @@ class Particle extends PhetioObject { } public setPositionAndDestination( newPosition: Vector2 ): void { - if ( newPosition instanceof Vector2 ) { // TODO: remove this check, let TypeScript do the work, https://github.com/phetsims/shred/issues/38 this.destinationProperty.set( newPosition ); this.moveImmediatelyToDestination(); - } } public static ParticleIO = new IOType( 'ParticleIO', { diff --git a/js/model/ParticleAtom.ts b/js/model/ParticleAtom.ts index e63a47c..3fa3f78 100644 --- a/js/model/ParticleAtom.ts +++ b/js/model/ParticleAtom.ts @@ -59,8 +59,6 @@ class ParticleAtom extends PhetioObject { private readonly nucleonRadius: number; public readonly positionProperty: TProperty; public readonly nucleusOffsetProperty: TProperty; - - // TODO: must be public for BAN, see https://github.com/phetsims/shred/issues/38 public readonly protons: ObservableArray; public readonly neutrons: ObservableArray; public readonly electrons: ObservableArray; diff --git a/js/view/ExpandedPeriodicTableNode.ts b/js/view/ExpandedPeriodicTableNode.ts index 00f8b54..dd84e84 100644 --- a/js/view/ExpandedPeriodicTableNode.ts +++ b/js/view/ExpandedPeriodicTableNode.ts @@ -63,7 +63,7 @@ class ExpandedPeriodicTableNode extends Node { } for ( let i = 0; i < rows; i++ ) { const populatedCellsInRow = POPULATED_CELLS[ i ]; - // TODO: test this, https://github.com/phetsims/shred/issues/38 + for ( let j = 0; j < populatedCellsInRow.length; j++ ) { const atomicNumber = elementIndex; const button = new TextPushButton( AtomIdentifier.getSymbol( elementIndex ), {