Closed pixelzoom closed 1 year ago
The problem is in ABSModel.ts. It's updating only when the selected solution changes. It also needs to update when that solution's pH changes. Relevant code:
this.pHProperty = new DerivedProperty( [ solutionProperty ], solution => solution.pHProperty.value, {
tandem: tandem.createTandem( 'pHProperty' ),
phetioValueType: NumberIO
} );
Fixed in the above commit. The new derivation in ABSModel.ts is:
// Synchronize with the pH of the selected solution.
this.pHProperty = DerivedProperty.deriveAny( [ solutionProperty, ...solutions.map( solution => solution.pHProperty ) ],
() => solutionProperty.value.pHProperty.value, {
tandem: tandem.createTandem( 'pHProperty' ),
phetioValueType: NumberIO
} );
I broke something during #178 PhET-iO instrumentation. The pH value is not updating in the My Solutions screen. Investigating...