event-gestures.js revision 870b1351b8dad6efd508aacc807cd53dbd43b7c8
// TODO: Better way to sniff 'n' switch touch support?
TOUCH_EVENT_MAP = {
start: "touchstart",
end: "touchend"
},
MOUSE_EVENT_MAP = {
start: "mousedown",
end: "mouseup"
},
START = "start",
END = "end",
OWNER_DOCUMENT = "ownerDocument",
MIN_VELOCITY = "minVelocity",
MIN_DISTANCE = "minDistance",
FLICK_START = "_flickStart",
FLICK_START_HANDLE = "_flickStartHandle",
FLICK_END_HANDLE = "_flickEndHandle";
null, // Don't want stuff mixed into the facade
node,
ce);
},
if (startHandle) {
}
if (endHandle) {
}
},
processArgs: function(args) {
if (!(MIN_VELOCITY in params)) {
}
if (!(MIN_DISTANCE in params)) {
}
return params;
},
var start = true, // always true for mouse
doc;
if (e.touches) {
e = e.touches[0];
}
if (start) {
e.preventDefault();
});
if (!endHandle) {
}
}
},
endEvent = e,
time,
axis;
if (valid) {
if (e.changedTouches) {
} else {
valid = false;
}
}
if (valid) {
xyDistance = [
];
end : {
}
});
}
}
}
},
MIN_VELOCITY : 0,
MIN_DISTANCE : 10
});
// TODO: Better way to sniff 'n' switch touch support?
TOUCH_EVENT_MAP = {
start: "touchstart",
move: "touchmove",
end: "touchend"
},
MOUSE_EVENT_MAP = {
start: "mousedown",
move: "mousemove",
end: "mouseup"
},
START = "start",
MOVE = "move",
END = "end",
MOVE_START_HANDLE = "_moveStartHandle",
MOVE_HANDLE = "_moveHandle",
MOVE_END_HANDLE = "_moveEndHandle",
MOVE_START = "_moveStart",
_MOVE = "_move",
MIN_TIME = "minTime",
MIN_DISTANCE = "minDistance",
OWNER_DOCUMENT = "ownerDocument";
null,
node,
ce);
},
if (startHandle) {
}
},
processArgs : function(args) {
}
if (!(MIN_DISTANCE in params)) {
}
return params;
},
e.preventDefault();
var start = true, // always true for mouse
if (e.touches) {
e = e.touches[0];
}
if (start) {
// TODO: Pass through e instead?
payload = {
};
}
},
MIN_TIME : 0,
MIN_DISTANCE : 3
});
null,
node,
ce);
},
if (moveHandle) {
moveHandle.detach();
}
},
if (move) {
if (e.touches) {
e = e.touches[0];
}
if (move) {
e.preventDefault();
payload = {
};
}
}
}
});
null,
node,
ce);
},
if (endHandle) {
}
},
if (moveEnd) {
if (e.changedTouches) {
e = e.changedTouches[0];
} else {
moveEnd = false;
}
}
if (moveEnd) {
e.preventDefault();
payload = {
};
}
}
}
});