Skip to content

ZoomButtonGroup

Overview

ZoomButtonGroup is the base class for a pair of buttons used to zoom 'in' and 'out'.

@author Chris Malley (PixelZoom, Inc.)

Class ZoomButtonGroup

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

Constructor

new ZoomButtonGroup( zoomLevelProperty : TRangedProperty, zoomInIcon : Node, zoomOutIcon : Node, providedOptions? : ZoomButtonGroupOptions )

Instance Methods

dispose()

Instance Properties

zoomInButton : RectangularPushButton

(readonly)

zoomOutButton : RectangularPushButton

(readonly)

Type ZoomButtonGroupOptions

import type { ZoomButtonGroupOptions } from 'scenerystack/scenery-phet';
  • applyZoomIn?: ( currentZoom: number ) => number
    function applied when the '+' button is pressed
  • applyZoomOut?: ( currentZoom: number ) => number
    function applied when the '-' button is pressed
  • buttonOptions?: StrictOmit<RectangularPushButtonOptions, "content" | "listener" | "tandem">
    propagated to the '+' and '-' push buttons
  • touchAreaXDilation?: number
    pointer area dilation, correct for options.orientation, and overlap will be prevented by shifting
  • touchAreaYDilation?: number
  • mouseAreaXDilation?: number
  • mouseAreaYDilation?: number
  • & StrictOmit<FlowBoxOptions, "children">

Source Code

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