0.3.0 • Published 5 years ago

swipe-dispatcher v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Swipe Dispatcher

Dispatch custom swipe events to DOM nodes.

Usage

import SwipeDispatcher from 'swipe-dispatcher';

new SwipeDispatcher( { /* options */ } );

Options

OptionDefaultDescription
rootdocument.documentElementEvent listeners get attached to this node
maxTime333The maximum time a swipe should take
minDistance100The minimum move distance
variance100The allowed horizontal/vertical variance
preventMovetrueShould preventDefault be called on touchmove