dispatch:events-pan

v0.0.1Published 11 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

events-pan

Adds Events.Pan event touch pan handler

Usage:

1  // Instanciate
2  var e = new Events.Pan(element);
3
4  // Listen to events
5  e.on('start', function(evt) {});
6  e.on('move', function(evt) {});
7  e.on('end', function(evt) {});
8
9  // Clean up
10  e.destroy();

Event object:

1  {
2    delta: {
3      time: 0,
4      x: 0,
5      y: 0
6    },
7    position: {
8      x: 0,
9      y: 0
10    },
11    velocity: {
12      time: 0,
13      x: 0,
14      y: 0
15    }
16  }