Skip to content

JoistButton

Overview

Base class for Joist buttons such as the "home" button and "PhET" button that show custom highlighting on mouseover.

@author Sam Reid (PhET Interactive Simulations)

Class JoistButton

import { JoistButton } from 'scenerystack/joist';

Constructor

new JoistButton( content : Node, navigationBarFillProperty : TReadOnlyProperty<Color>, providedOptions : JoistButtonOptions )

Instance Methods

isPDOMClicking() : boolean

Is the button currently firing because of accessibility input coming from the PDOM? (pdom)

Instance Properties

buttonModel : PushButtonModel

(protected, readonly)

(phet-io|a11y) - Button model Note it shares a tandem with "this", so the emitter will be instrumented as a child of the button

interactionStateProperty : PushButtonInteractionStateProperty

(protected, readonly)

Type JoistButtonOptions

import type { JoistButtonOptions } from 'scenerystack/joist';
  • highlightExtensionWidth?: number
  • highlightExtensionHeight?: number
  • highlightCenterOffsetX?: number
  • highlightCenterOffsetY?: number
  • pointerAreaDilationX?: number
  • pointerAreaDilationY?: number
  • listener?: ( () => void ) | null
  • & StrictOmit<ParentOptions, "children"> & PickRequired<ParentOptions, "tandem">

Source Code

See the source for JoistButton.ts in the joist repository.