Skip to content

RectangularPushButton

Overview

RectangularPushButton is a rectangular push button, used to initiate some action.

@author John Blanco (PhET Interactive Simulations)

Class RectangularPushButton

import { RectangularPushButton } from 'scenerystack/sun';

Constructor

new RectangularPushButton( providedOptions? : RectangularPushButtonOptions )

Instance Methods

dispose()

addListener( listener : PushButtonListener )

Adds a listener that will be notified when the button fires.

removeListener( listener : PushButtonListener )

Removes a listener.

Instance Properties

pushButtonModel : PushButtonModel

(protected, readonly)

RectangularButton has this.buttonModel, but we also need this.pushButtonModel, because it has additional methods

Type RectangularPushButtonOptions

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

Source Code

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