Skip to content

Commit

Permalink
uninstrument number displays for temperature, see #341
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Aug 8, 2023
1 parent 492c2a5 commit fbdc667
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions js/common/view/ThermometerAndReadout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ class ThermometerAndReadout extends Node {
);

// Create the temperature readout.
const temperatureReadoutTandem = options.tandem.createTandem( 'temperatureReadout' );
const temperatureReadout = new NumberDisplay( temperatureValueProperty, new Range( 0, 999 ), {
centerTop: thermometerNode.centerBottom.plusXY( 0, THERMOMETER_TO_READOUT_DISTANCE ),
backgroundStroke: Color.BLACK,
Expand All @@ -206,10 +205,8 @@ class ThermometerAndReadout extends Node {
},
valuePattern: new PatternStringProperty(
GreenhouseEffectStrings.temperature.units.valueUnitsPatternStringProperty,
{ units: unitsStringProperty },
{ tandem: temperatureReadoutTandem.createTandem( 'valuePatternStringProperty' ) }
{ units: unitsStringProperty }
),
tandem: temperatureReadoutTandem,
phetioVisiblePropertyInstrumented: false
} );
this.addChild( temperatureReadout );
Expand Down
5 changes: 0 additions & 5 deletions js/layer-model/view/AtmosphereLayerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class AtmosphereLayerNode extends Node {
);

// Create the temperature readout.
const temperatureReadoutTandem = options.tandem.createTandem( 'temperatureReadout' );
const temperatureReadout = new NumberDisplay( temperatureValueProperty, new Range( 0, 999 ), {
visibleProperty: showTemperatureProperty,
backgroundStroke: Color.BLACK,
Expand All @@ -141,12 +140,8 @@ class AtmosphereLayerNode extends Node {
fahrenheitString;
}
)
},
{
tandem: temperatureReadoutTandem.createTandem( 'valuePatternStringProperty' )
}
),
tandem: temperatureReadoutTandem,
decimalPlaces: 1,
cornerRadius: 3,
noValueAlign: 'center',
Expand Down

0 comments on commit fbdc667

Please sign in to comment.