From 08a4bb6cec75f9a86089fabc3fac1246ed6a9411 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Thu, 18 Jul 2024 16:34:14 -0600 Subject: [PATCH] feature MaterialProperty instances, https://github.com/phetsims/density-buoyancy-common/issues/228 Signed-off-by: Michael Kauzmann --- js/common/model/MaterialProperty.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/common/model/MaterialProperty.ts b/js/common/model/MaterialProperty.ts index fa5042f8..42058aa4 100644 --- a/js/common/model/MaterialProperty.ts +++ b/js/common/model/MaterialProperty.ts @@ -12,7 +12,7 @@ import densityBuoyancyCommon from '../../densityBuoyancyCommon.js'; import Material from './Material.js'; import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js'; import MappedWrappedProperty from './MappedWrappedProperty.js'; -import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; +import { combineOptions, EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; import Tandem from '../../../../tandem/js/Tandem.js'; import PickRequired from '../../../../phet-core/js/types/PickRequired.js'; import { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js'; @@ -27,7 +27,9 @@ export default class MaterialProperty extends MappedWrappedProperty { public constructor( material: Material, createCustomMaterial: ( tandem: Tandem ) => Material, providedOptions: MaterialPropertyOptions ) { const customMaterial = createCustomMaterial( providedOptions.tandem.createTandem( 'customMaterial' ) ); - super( material, customMaterial, providedOptions ); + super( material, customMaterial, combineOptions( { + phetioFeatured: true + }, providedOptions ) ); this.densityProperty = this.dynamicValueProperty; this.customMaterial = this.customValue; }