Skip to content

RoundMomentaryButton

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/sun/blob/main/js/buttons/RoundMomentaryButton.ts for the most up-to-date information.

Overview

RoundMomentaryButton is a round momentary button that toggles a Property between 2 values. The 'off value' is the value when the button is not pressed. The 'on value' is the value when the button is pressed.

TODO: Not supported with alternative input, see https://github.com/phetsims/scenery/issues/1117

@author Chris Malley (PixelZoom, Inc.)

Class RoundMomentaryButton

import { RoundMomentaryButton } from 'scenerystack/sun';

Constructor

new RoundMomentaryButton( property : TProperty<T>, valueOff : T, valueOn : T, providedOptions? : RoundMomentaryButtonOptions )

Instance Methods

dispose()

Type RoundMomentaryButtonOptions

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

Source Code

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