diff --git a/js/buoyancy/view/BuoyancyExploreScreenView.ts b/js/buoyancy/view/BuoyancyExploreScreenView.ts index 83422702..9e4c7938 100644 --- a/js/buoyancy/view/BuoyancyExploreScreenView.ts +++ b/js/buoyancy/view/BuoyancyExploreScreenView.ts @@ -35,9 +35,6 @@ import CuboidView from '../../common/view/CuboidView.js'; import ScaleView from '../../common/view/ScaleView.js'; import MassView from '../../common/view/MassView.js'; -// constants -const MARGIN = DensityBuoyancyCommonConstants.MARGIN; - export default class BuoyancyExploreScreenView extends DensityBuoyancyScreenView { protected rightBox: PrimarySecondaryControlsNode; @@ -56,14 +53,14 @@ export default class BuoyancyExploreScreenView extends DensityBuoyancyScreenView this.model.poolBounds.left, this.model.poolBounds.top, this.model.poolBounds.front - ) ).x - 2 * MARGIN + ) ).x - 2 * DensityBuoyancyCommonConstants.MARGIN } ); this.addChild( new AlignBox( buoyancyDisplayOptionsPanel, { alignBoundsProperty: this.visibleBoundsProperty, xAlign: 'left', yAlign: 'bottom', - margin: MARGIN + margin: DensityBuoyancyCommonConstants.MARGIN } ) ); const displayedMysteryMaterials = [ @@ -98,7 +95,7 @@ export default class BuoyancyExploreScreenView extends DensityBuoyancyScreenView alignBoundsProperty: this.visibleBoundsProperty, xAlign: 'center', yAlign: 'bottom', - margin: MARGIN + margin: DensityBuoyancyCommonConstants.MARGIN } ) ); [ model.primaryMass, model.secondaryMass ].forEach( mass => { @@ -164,7 +161,7 @@ export default class BuoyancyExploreScreenView extends DensityBuoyancyScreenView alignBoundsProperty: this.visibleBoundsProperty, xAlign: 'right', yAlign: 'top', - margin: MARGIN + margin: DensityBuoyancyCommonConstants.MARGIN } ) ); const blocksRadioButtonGroup = new BlocksRadioButtonGroup( model.modeProperty, { diff --git a/js/buoyancy/view/BuoyancyIntroScreenView.ts b/js/buoyancy/view/BuoyancyIntroScreenView.ts index a716a250..4043d8f3 100644 --- a/js/buoyancy/view/BuoyancyIntroScreenView.ts +++ b/js/buoyancy/view/BuoyancyIntroScreenView.ts @@ -48,6 +48,7 @@ export default class BuoyancyIntroScreenView extends DensityBuoyancyScreenView( { + // Custom just for this screen cameraLookAt: new Vector3( 0, -0.1, 0 ), @@ -89,7 +90,6 @@ export default class BuoyancyIntroScreenView extends DensityBuoyancyScreenView { - return toLiters( 0.01 - volume ); - } ); + const airLitersProperty = new DerivedProperty( [ model.bottle.interiorVolumeProperty ], volume => toLiters( 0.01 - volume ) ); let materialChangeLocked = false; Multilink.lazyMultilink( [ model.customDensityProperty, model.bottle.interiorMassProperty, model.customDensityControlVisibleProperty ], density => {