TouchGesturesModule Module

The TouchGesturesModule class enables touch gesture detection.

Usage

const TouchGestures = require('TouchGestures');

Properties

This class exposes no properties.

Methods

MethodDescription

onLongPress

onLongPress(): EventSource onLongPress(object: SceneObjectBase): EventSource onLongPress(options: {object?: SceneObjectBase, normalizeCoordinates?: boolean}): EventSource

Returns an EventSource, to which you may subscribe, that emits a LongPressGesture object for each long-press interaction.

When object is specified, only events for the specified object are emitted.

onPan

onPan(): EventSource onPan(object: SceneObjectBase): EventSource onPan(options: {object?: SceneObjectBase, normalizeCoordinates?: boolean}): EventSource

Returns an EventSource, to which you may subscribe, that emits a PanGesture object for each pan interaction.

When object is specified, only events for the specified object are emitted.

onPinch

onPinch(): EventSource onPinch(object: SceneObjectBase): EventSource onPinch(options: {object?: SceneObjectBase, normalizeCoordinates?: boolean}): EventSource

Returns an EventSource, to which you may subscribe, that emits a PinchGesture object for each pinch interaction.

When object is specified, only events for the specified object are emitted.

onRotate

onRotate(): EventSource onRotate(object: SceneObjectBase): EventSource onRotate(options: {object?: SceneObjectBase, normalizeCoordinates?: boolean}): EventSource

Returns an EventSource, to which you may subscribe, that emits a RotateGesture object for each rotate interaction.

When object is specified, only events for the specified object are emitted.

onTap

 onTap(): EventSource  onTap(object: SceneObjectBase): EventSource  onTap(options: {object?: SceneObjectBase, normalizeCoordinates?: boolean}): EventSource  

 Returns an EventSource, to which you may subscribe, that emits a TapGesture object for each tap interaction.

 When object is specified, only events for the specified object are emitted.

Classes

ClassDescription

Gesture

The Gesture class encapsulates details of a detected gesture.

LongPressGesture

The LongPressGesture class contains the details of a detected long-press gesture.

PanGesture

The PanGesture class contains the details of a detected pan gesture.

PinchGesture

The PinchGesture class contains the details of a detected pinch gesture.

RotateGesture

The RotateGesture class contains the details of a detected rotate gesture.

TapGesture

The TapGesture class contains the details of a detected tap gesture.

Enums

EnumDescription

State

The State enum describes the state of a Gesture.

Type

The Type enum describes a touch gesture.