Skip to content

ResetAllButton

Overview

Reset All button, typically used to reset everything ('reset all') on a Screen. Extends ResetButton, adding things that are specific to 'reset all'.

@author John Blanco (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.)

Class ResetAllButton

import { ResetAllButton } from 'scenerystack/scenery-phet';

Constructor

new ResetAllButton( providedOptions? : ResetAllButtonOptions )

Instance Methods

dispose()

Static Properties

RESET_ALL_HOTKEY_DATA : HotkeyData

(readonly)

Type ResetAllButtonOptions

import type { ResetAllButtonOptions } from 'scenerystack/scenery-phet';
  • phetioRestoreScreenStateOnReset?: boolean
    option specific to ResetAllButton. If true, then the reset all button will reset back to the previous PhET-iO state, if applicable.
  • interruptScreenViewInput?: boolean
    When reset all is called, search for all ancestor Nodes that are JOIST/ScreenView and call Node.interruptSubtreeInput() on each. See https://github.com/phetsims/scenery-phet/issues/861
  • & StrictOmit<ResetButtonOptions, "xMargin" | "yMargin">

Source Code

See the source for ResetAllButton.ts in the scenery-phet repository.