event-move-debug.js revision 05c5ddfc5ea15459fa236a4dd3e13e21e5d6ae6d
// 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
},
_defArgsProcessor = function(args) {
},
},
define('gesturemovestart', {
// TODO: optimize to one listener per node.
this._onStart,
this,
node,
ce);
},
if (startHandle) {
subscriber[_MOVE_START_HANDLE] = null;
}
},
processArgs : function(args) {
}
if (!(MIN_DISTANCE in params)) {
}
return params;
},
},
e.preventDefault();
var origE = e,
start = true,
if (e.touches) {
e = e.touches[0];
} else {
}
Y.log("gesturemovestart: params = button:" + button + ", minTime = " + minTime + ", minDistance = " + minDistance);
if (start) {
Y.log("gesturemovestart: No minTime or minDistance.");
} else {
if (minTime > 0) {
Y.log("gesturemovestart: minTime specified. Setup timer.");
}, this));
}
if (minDistance > 0) {
Y.log("gesturemovestart: minDistance specified. Setup native mouse/touchmove listener to measure distance.");
if (Math.abs(em.pageX - startXY[0]) > minDistance || Math.abs(em.pageY - startXY[1]) > minDistance) {
Y.log("gesturemovestart: minDistance hit.");
}
}, this));
}
}
}
},
}
}
}
},
if (params) {
}
e.type = "gesturemovestart";
},
MIN_TIME : 0,
MIN_DISTANCE : 0
});
define('gesturemove', {
this._onMove,
this,
node,
ce);
},
if (moveHandle) {
moveHandle.detach();
subscriber[_MOVE_HANDLE] = null;
}
},
},
origE = e;
if (move) {
if (e.touches) {
e = e.touches[0];
}
if (move) {
e.type = "gesturemove";
e._extra = {
};
}
}
}
});
define('gesturemoveend', {
this._onEnd,
this,
node,
ce);
},
if (endHandle) {
subscriber[_MOVE_END_HANDLE] = null;
}
},
},
origE = e;
if (moveEnd) {
if (e.changedTouches) {
e = e.changedTouches[0];
} else {
moveEnd = false;
}
}
if (moveEnd) {
e.type = "gesturemoveend";
e._extra = {
};
}
}
}
});