From 7f990c3cba3ff8d87df0413abe7c0f64f44f4726 Mon Sep 17 00:00:00 2001 From: AgustinVallejo Date: Tue, 6 Aug 2024 12:26:53 -0500 Subject: [PATCH] Improving documentation https://github.com/phetsims/density-buoyancy-common/issues/268 --- js/common/model/Material.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/common/model/Material.ts b/js/common/model/Material.ts index ad1fa04f..487f1de2 100644 --- a/js/common/model/Material.ts +++ b/js/common/model/Material.ts @@ -87,7 +87,9 @@ export default class Material extends PhetioObject implements MappedWrappedObjec phetioDocumentation: 'Density of the material', phetioReadOnly: !( providedOptions.hidden || providedOptions.custom ), // Read-only unless it's a mystery or custom material rangePropertyOptions: { - reentrant: true, // needed for the range mutation in MaterialControlNode, see https://github.com/phetsims/density-buoyancy-common/issues/268 + // When used in a MaterialControlNode, the component will override the rangeProperty, even when the sim is reset + // This is done in a recursive/reentrant link call, so we need to ensure that the value comparison is an equals function + reentrant: true, valueComparisonStrategy: 'equalsFunction' }, range: new Range( 0.8, 27000 ),