Skip to content

Commit

Permalink
instrument concentrationMeterNode.bodyNode.valueText.stringProperty, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 11, 2023
1 parent 5aa6b15 commit 676f4a6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/concentration/view/ConcentrationMeterNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import BLLMovable from '../../common/model/BLLMovable.js';
import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import BLLPreferences from '../../common/model/BLLPreferences.js';
import Multilink from '../../../../axon/js/Multilink.js';
import StringIO from '../../../../tandem/js/types/StringIO.js';

// constants
const DECIMAL_PLACES_MOLES_PER_LITER = 3;
Expand Down Expand Up @@ -145,6 +146,7 @@ class BodyNode extends Node {
} );

// value + units
const valueTextTandem = tandem.createTandem( 'valueText' );
const valueStringProperty = new DerivedProperty(
[
BeersLawLabStrings.pattern[ '0value' ][ '1unitsStringProperty' ],
Expand All @@ -169,13 +171,15 @@ class BodyNode extends Node {
}
}
return text;
}
);
}, {
tandem: valueTextTandem.createTandem( Text.STRING_PROPERTY_TANDEM_NAME ),
phetioValueType: StringIO
} );
const valueText = new Text( valueStringProperty, {
font: new PhetFont( 22 ),
fill: 'black',
maxWidth: 125,
tandem: tandem.createTandem( 'valueText' ),
tandem: valueTextTandem,
stringPropertyOptions: { phetioReadOnly: true }
} );

Expand Down

0 comments on commit 676f4a6

Please sign in to comment.