diff --git a/js/density/view/DensityIntroScreenView.ts b/js/density/view/DensityIntroScreenView.ts index f826648b..a38274ce 100644 --- a/js/density/view/DensityIntroScreenView.ts +++ b/js/density/view/DensityIntroScreenView.ts @@ -52,6 +52,13 @@ export default class DensityIntroScreenView extends DensityBuoyancyScreenView { + return units === 'liters' ? litersReadout : decimetersCubedReadout; + } ); const densityAccordionBox = new AccordionBox( new DensityNumberLineNode( { displayDensities: [ // DerivedProperty doesn't need disposal, since everything here lives for the lifetime of the simulation @@ -76,13 +83,7 @@ export default class DensityIntroScreenView extends DensityBuoyancyScreenView( { - titleNode: new RichText( new DerivedProperty( [ - DensityBuoyancyCommonPreferences.volumeUnitsProperty, - DensityBuoyancyCommonStrings.densityReadoutStringProperty, - DensityBuoyancyCommonStrings.densityReadoutDecimetersCubedStringProperty - ], ( units, litersReadout, decimetersCubedReadout ) => { - return units === 'liters' ? litersReadout : decimetersCubedReadout; - } ), { + titleNode: new RichText( accordionBoxTitleStringProperty, { font: DensityBuoyancyCommonConstants.TITLE_FONT, maxWidth: 200, visiblePropertyOptions: { @@ -91,7 +92,8 @@ export default class DensityIntroScreenView extends DensityBuoyancyScreenView