From bbb9f6095915a061114e3e835da7c5010c815650 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Wed, 29 May 2024 07:50:39 -0600 Subject: [PATCH] Add REVIEW comments, see https://github.com/phetsims/density-buoyancy-common/issues/123 --- js/buoyancy/model/BuoyancyApplicationsModel.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/buoyancy/model/BuoyancyApplicationsModel.ts b/js/buoyancy/model/BuoyancyApplicationsModel.ts index 47209ff0..0bada9ad 100644 --- a/js/buoyancy/model/BuoyancyApplicationsModel.ts +++ b/js/buoyancy/model/BuoyancyApplicationsModel.ts @@ -97,6 +97,7 @@ export default class BuoyancyApplicationsModel extends DensityBuoyancyModel { } ); // Adjust pool volume so that it's at the desired value WITH the pool scales inside. + // REVIEW: How does this relate to https://github.com/phetsims/density-buoyancy-common/blob/4038cb05c2b5c2b8b1f600bfbcf0a7eaac4617a2/js/common/model/DensityBuoyancyModel.ts#L435-L437 this.pool.liquidVolumeProperty.setInitialValue( this.pool.liquidVolumeProperty.value ); // This instance lives for the lifetime of the simulation, so we don't need to remove this listener @@ -104,6 +105,8 @@ export default class BuoyancyApplicationsModel extends DensityBuoyancyModel { this.bottle.internalVisibleProperty.value = scene === 'bottle'; this.boat.internalVisibleProperty.value = scene === 'boat'; this.block.internalVisibleProperty.value = scene === 'boat'; + + // As described in https://github.com/phetsims/buoyancy/issues/118#issue-2192969056, the underwater scale only shows for the bottle scene, not for the boat this.scale2!.internalVisibleProperty.value = scene === 'bottle'; // When switching from boat to bottle scene, subtract the scale volume from the pool and vice versa (-1 and 1) @@ -143,6 +146,8 @@ export default class BuoyancyApplicationsModel extends DensityBuoyancyModel { */ public override reset(): void { + // REVIEW: Can we call resetBoatScene from reset? + this.bottle.reset(); this.block.reset(); this.boat.reset();