Pan
Recognized when the pointer is down and moved in the allowed direction.
Constructor
import {EventManager, Pan, InputDirection} from 'mjolnir.js';
const eventManager = new EventManager({
// ...
recognizers: [new Pan({direction: InputDirection.Horizontal})]
});
options(object, optional) - Optionsevent(string) - Name of the event. Default'pan'.pointers(number) - Required pointers. Default1.threshold(number) - Minimal pan distance required before recognizing. Default10.direction(InputDirection) - Direction of the panning. DefaultInputDirection.All.
Events
- pan, together with all of below
- panstart
- panmove
- panend
- pancancel
- panleft
- panright
- panup
- pandown
Source
https://github.com/visgl/mjolnir.js/blob/master/src/hammerjs/recognizers/pan.ts