Skip to content

Commit

Permalink
test out some hasListenerOrderDependencies for listener order CT erro…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 31, 2023
1 parent ab0ff96 commit 0329c95
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/model/ParticleAtom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ class ParticleAtom extends PhetioObject {

this.protons = createObservableArray( {
// tandem: options.tandem.createTandem( 'protons' ),
phetioType: createObservableArray.ObservableArrayIO( Particle.ParticleIO )
phetioType: createObservableArray.ObservableArrayIO( Particle.ParticleIO ),
hasListenerOrderDependencies: true // TODO: Not positive that this is true, but CT will let us know, see https://github.com/phetsims/build-a-nucleus/issues/105
} );
this.neutrons = createObservableArray( {
// tandem: options.tandem.createTandem( 'neutrons' ),
phetioType: createObservableArray.ObservableArrayIO( Particle.ParticleIO )
phetioType: createObservableArray.ObservableArrayIO( Particle.ParticleIO ),
hasListenerOrderDependencies: true // TODO: Not positive that this is true, but CT will let us know, see https://github.com/phetsims/build-a-nucleus/issues/105
} );
this.electrons = createObservableArray( {
// tandem: options.tandem.createTandem( 'electrons' ),
Expand Down Expand Up @@ -395,7 +397,7 @@ class ParticleAtom extends PhetioObject {
assert && assert( typeof ( particle.particleAtomRemovalListener ) === 'function',
'No particle removal listener attached to particle.'
);
particle.userControlledProperty.unlink( particle.particleAtomRemovalListener ! );
particle.userControlledProperty.unlink( particle.particleAtomRemovalListener! );

particle.particleAtomRemovalListener = null;
}
Expand Down

0 comments on commit 0329c95

Please sign in to comment.