Skip to content

SimpleDragHandler

Overview

Basic dragging for a node.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class SimpleDragHandler

@deprecated - please use DragListener for new code

import { SimpleDragHandler } from 'scenerystack/scenery';

Constructor

new SimpleDragHandler( options )

Instance Methods

startDrag( event )

@public

@param {SceneryEvent} event

endDrag( event )

@public

@param {SceneryEvent} event

interrupt()

Called when input is interrupted on this listener, see https://github.com/phetsims/scenery/issues/218 @public

tryToSnag( event )

@public

@param {SceneryEvent} event

tryTouchToSnag( event )

@public

@param {SceneryEvent} event

dispose()

Disposes this listener, releasing any references it may have to a pointer. @public

Static Methods

createForwardingListener( down, options )

Creates an input listener that forwards events to the specified input listener @public

See https://github.com/phetsims/scenery/issues/639

@param {function(SceneryEvent)} down - down function to be added to the input listener @param {Object} [options] @returns {Object} a scenery input listener

Source Code

See the source for SimpleDragHandler.js in the scenery repository.