Skip to content

PointerCoordinatesNode

Under Construction

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

Overview

Shows the model and view coordinates that correspond to the cursor position. Originally implemented for use in gas-properties, where it was used exclusively for debugging. CAUTION! This adds a listener to the Display, see notes below.

@author Chris Malley (PixelZoom, Inc.)

Class PointerCoordinatesNode

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

Constructor

new PointerCoordinatesNode( modelViewTransform : ModelViewTransform2, providedOptions? : PointerCoordinatesNodeOptions )

Instance Methods

Type PointerCoordinatesNodeOptions

import type { PointerCoordinatesNodeOptions } from 'scenerystack/scenery-phet';
  • display?: Display
  • pickable?: boolean
  • font?: Font
    RichText
  • textColor?: TColor
  • align?: RichTextAlign
  • modelDecimalPlaces?: number
  • viewDecimalPlaces?: number
  • backgroundColor?: TColor
    Rectangle

Source Code

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