Move.js revision c085d8015ca7637ffa99e3bf8c9af0136e593d59
// TODO: Better way to sniff 'n' switch touch support?
start: "touchstart",
move: "touchmove",
end: "touchend"
} : {
start: "mousedown",
move: "mousemove",
end: "mouseup"
},
START = "start",
MOVE = "move",
END = "end",
MOVE_START_HANDLE = "_msh",
MOVE_HANDLE = "_mh",
MOVE_END_HANDLE = "_meh",
MOVE_START = "_ms",
_MOVE = "_m",
MIN_TIME = "minTime",
MIN_DISTANCE = "minDistance",
OWNER_DOCUMENT = "ownerDocument",
NODE_TYPE = "nodeType",
PUB_CFG = {
emitFacade:false
},
define('movestart', {
this._onStart,
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) {
e.type = "movestart";
// TODO: Pass through e instead?
/*
payload = {
target: e.target,
currentTarget: e.currentTarget,
time : new Date().getTime(),
clientX: e.clientX,
clientY: e.clientY,
pageX: e.pageX,
pageY: e.pageY,
button : e.button,
_e : e
};
*/
}
},
MIN_TIME : 0,
MIN_DISTANCE : 3
});
define('move', {
null,
node,
ce);
},
if (moveHandle) {
moveHandle.detach();
}
},
te;
if (move) {
if (e.touches) {
te = e;
e = e.touches[0];
if (!e.target) {
}
}
if (move) {
e.preventDefault();
e.type = "move";
/*
payload = {
target: e.target,
currentTarget: e.currentTarget,
time : new Date().getTime(),
clientX: e.clientX,
clientY: e.clientY,
pageX: e.pageX,
pageY: e.pageY,
button : e.button,
_e : e
};
*/
}
}
}
});
define('moveend', {
null,
node,
ce);
},
if (endHandle) {
}
},
if (moveEnd) {
if (e.changedTouches) {
e = e.changedTouches[0];
} else {
moveEnd = false;
}
}
if (moveEnd) {
e.preventDefault();
e.type = "moveend";
/*
payload = {
target: e.target,
currentTarget: e.currentTarget,
time : new Date().getTime(),
clientX: e.clientX,
clientY: e.clientY,
pageX: e.pageX,
pageY: e.pageY,
button: e.button,
_e : e
};
*/
}
}
}
});