ReturnTypes

Namespace

ReturnTypes

Description:
  • Here are the return "types" of the gestures that are included in this package.
Source:

Type Definitions

BaseData

Description:
  • The base data that is included for all emitted gestures.
Source:
Properties:
Name Type Description
centroid westures-core.Point2D The centroid of the input points.
event Event The input event which caused the gesture to be recognized.
phase string 'start', 'move', 'end', or 'cancel'.
type string The name of the gesture as specified by its designer.
target Element The bound target of the gesture.
The base data that is included for all emitted gestures.
Type:
  • Object

PanData

Description:
  • Data returned when a Pan is recognized.
Source:
Mixes In:
Properties:
Name Type Description
translation westures-core.Point2D The change vector from the last emit.
Data returned when a Pan is recognized.
Type:
  • Object

PinchData

Description:
  • Data returned when a Pinch is recognized.
Source:
Mixes In:
Properties:
Name Type Description
distance number The average distance from an active input to the centroid.
scale number The proportional change in distance since last emit.
Data returned when a Pinch is recognized.
Type:
  • Object

PressData

Description:
  • Data returned when a Press is recognized.
Source:
Properties:
Name Type Description
centroid westures-core.Point2D The current centroid of the input points.
initial westures-core.Point2D The initial centroid of the input points.
distance number The total movement since initial contact.
Data returned when a Press is recognized.
Type:
  • Object

PullData

Description:
  • Data returned when a Pull is recognized.
Source:
Mixes In:
Properties:
Name Type Description
distance number The average distance from an active input to the centroid.
scale number The proportional change in distance since last emit.
pivot westures-core.Point2D The pivot point.
Data returned when a Pull is recognized.
Type:
  • Object

RotateData

Description:
  • Data returned when a Rotate is recognized.
Source:
Mixes In:
Properties:
Name Type Description
rotation number In radians, the change in angle since last emit.
Data returned when a Rotate is recognized.
Type:
  • Object

SwipeData

Description:
  • Data returned when a Swipe is recognized.
Source:
Mixes In:
Properties:
Name Type Description
velocity number The velocity of the swipe.
direction number In radians, the direction of the swipe.
point westures-core.Point2D The point at which the swipe ended.
time number The epoch time, in ms, when the swipe ended.
Data returned when a Swipe is recognized.
Type:
  • Object

SwivelData

Description:
  • Data returned when a Pivotable is recognized.
Source:
Mixes In:
Properties:
Name Type Description
rotation number In radians, the change in angle since last emit.
pivot westures-core.Point2D The pivot point.
Data returned when a Pivotable is recognized.
Type:
  • Object

SwivelData

Description:
  • Data returned when a Swivel is recognized.
Source:
Mixes In:
Properties:
Name Type Description
rotation number In radians, the change in angle since last emit.
pivot westures-core.Point2D The pivot point.
Data returned when a Swivel is recognized.
Type:
  • Object

TapData

Description:
  • Data returned when a Tap is recognized.
Source:
Mixes In:
Properties:
Name Type Description
x number x coordinate of tap point.
y number y coordinate of tap point.
Data returned when a Tap is recognized.
Type:
  • Object

TrackData

Description:
  • Data returned when a Track is recognized.
Source:
Mixes In:
Properties:
Name Type Description
active Array.<westures-core.Point2D> Points currently in 'start' or 'move' phase.
Data returned when a Track is recognized.
Type:
  • Object