Skip to content

BooleanToggleNode

Overview

Shows one node if the property is true or another node if the property is false. Used to indicate boolean state. This is a convenience API for true/false nodes, see SelectedNode for the general case.

@author Sam Reid (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.)

Class BooleanToggleNode

import { BooleanToggleNode } from 'scenerystack/sun';

Constructor

new BooleanToggleNode( booleanProperty : TReadOnlyProperty<boolean>, trueNode : Node, falseNode : Node, providedOptions? : BooleanToggleNodeOptions )

Instance Methods

Type BooleanToggleNodeOptions

import type { BooleanToggleNodeOptions } from 'scenerystack/sun';

ToggleNodeOptions

Source Code

See the source for BooleanToggleNode.ts in the sun repository.