Skip to content

Latest commit

 

History

History

rstream-gestures

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@thi.ng/rstream-gestures

npm (scoped)

About

Unified mouse, mouse wheel & single-touch event stream abstraction. Stream emits tuples of:

[type, {pos, click?, delta?, zoom}]

The click and delta values are only present if type == GestureType.DRAG. Both (and pos too) are 2-element arrays of [x,y] coordinates.

The zoom value is always present, but is only updated with wheel events. The value will be constrained to minZoom ... maxZoom interval (provided via options object).

Installation

yarn add @thi.ng/rstream-gestures

Usage examples

import * as rsg from "@thi.ng/rstream-gestures";

Authors

  • Karsten Schmidt

License

© 2018 Karsten Schmidt // Apache Software License 2.0