Skip to content

EnabledProperty

Overview

Property to control if something is enabled. This serves as a consistent class to control enabled. It also factors out PhET-iO instrumentation. Likely you should use it in cases like so:

const enabledProperty = new BooleanProperty( true, { tandem: options.tandem.createTandem( 'enabledProperty' ), phetioFeatured: true } );

@author Michael Kauzmann (PhET Interactive Simulations)

Class EnabledProperty

import { EnabledProperty } from 'scenerystack/axon';

Constructor

new EnabledProperty( initialEnabled : boolean, providedOptions? : EnabledPropertyOptions )

Instance Methods

Type EnabledPropertyOptions

import type { EnabledPropertyOptions } from 'scenerystack/axon';

Source Code

See the source for EnabledProperty.ts in the axon repository.