Skip to content

Commit

Permalink
rebuilt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Mar 19, 2015
1 parent 834110d commit ffc97fb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dist/ractive-events-tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
var ractive_events_tap = tap;

var DISTANCE_THRESHOLD = 5; // maximum pixels pointer can move before cancel
var TIME_THRESHOLD = 400;function tap(node, callback) {
return new TapHandler(node, callback);
}var TapHandler = function (node, callback) {
var TIME_THRESHOLD = 400;
function tap(node, callback) {
return new ractive_events_tap__TapHandler(node, callback);
}

var ractive_events_tap__TapHandler = function ractive_events_tap__TapHandler(node, callback) {
this.node = node;
this.callback = callback;

Expand All @@ -20,7 +23,7 @@
this.bind(node);
};

TapHandler.prototype = {
ractive_events_tap__TapHandler.prototype = {
bind: function bind(node) {
// listen for mouse/pointer events...
if (window.navigator.pointerEnabled) {
Expand Down Expand Up @@ -54,6 +57,7 @@

mousedown: function mousedown(event) {
var _this = this;

if (this.preventMousedownEvents) {
return;
}
Expand Down Expand Up @@ -116,6 +120,7 @@

touchdown: function touchdown() {
var _this = this;

var touch = event.touches[0];

var x = touch.clientX;
Expand Down

0 comments on commit ffc97fb

Please sign in to comment.