dispatchEvent(ev);
}
};
Gestures.register({
name: "downup",
deps: [ "mousedown", "touchstart", "touchend" ],
emits: [ "down", "up" ],
mousedown: function(e) {
var t = e.currentTarget;
var self = this;
var upfn = function upfn(e) {
self.fire("up", t, e);
document.removeEventListener("mouseup", upfn);
};
document.addEventListener("mouseup", upfn);
this.fire("down", t, e);
},
touchstart: function(e) {
this.fire("down", e.currentTarget, e.changedTouches[0]);
},
touchend: function(e) {
this.fire("up", e.currentT