From 676f4a622cf992e4dc09828d798b93661ecb10a0 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Wed, 11 Jan 2023 16:20:28 -0700 Subject: [PATCH] instrument concentrationMeterNode.bodyNode.valueText.stringProperty, https://github.com/phetsims/beers-law-lab/issues/308 --- js/concentration/view/ConcentrationMeterNode.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/concentration/view/ConcentrationMeterNode.ts b/js/concentration/view/ConcentrationMeterNode.ts index 29bd3a32..88d77f98 100644 --- a/js/concentration/view/ConcentrationMeterNode.ts +++ b/js/concentration/view/ConcentrationMeterNode.ts @@ -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; @@ -145,6 +146,7 @@ class BodyNode extends Node { } ); // value + units + const valueTextTandem = tandem.createTandem( 'valueText' ); const valueStringProperty = new DerivedProperty( [ BeersLawLabStrings.pattern[ '0value' ][ '1unitsStringProperty' ], @@ -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 } } );