1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
-
- Namespace.register("U.PH");
- if ("ontouchstart" in document) {
- (U.M.OTS) && (U.M.ReEvent("touchstart", document, U.M.OTS, true));
-
- U.M.AddEvent("touchstart", document, U.M.OTS = function () {
- var i, _UDOD = event.srcElement; U.M.UTX = null; U.M.StopBubble();
- U.M.ReEvent("touchstart", document, U.M.OTS, true);
- U.M.TouchE(_UDOD, "touchstart"); U.M.AddEvent("touchstart", document, U.M.OTS, true);
- U.M.AddEvent("touchmove", document, U.M.OTSM);
- U.M.AddEvent("touchend", document, U.M.OTSE, true);
- }, true);
- U.M.OTSM = function () {
- U.M.UTX = true; U.M.ReEvent("touchmove", document, U.M.OTSM); U.M.TouchE(event.srcElement, "touchmove"); U.M.StopBubble();
- }
-
- U.M.OTSE = function (UDOD) {
- U.M.ReEvent("touchend", document, U.M.OTSE, true); U.M.StopBubble();
- if (!U.M.UTX) { U.M.TouchE(event.srcElement, "touchend"); }
- }
- }
- U.PH.up = function (UDOD, UCB, UDE) {
- new _UDE.init(UDOD, UCB, UDE);
- }
- U.PH.up.init = function (UDOD, UCB, UDE) {
- U.Ut.AddObj(this, { obj: UDOD,
- cb: UCB,
- s: U.M.apply(this, this.start),
- m: U.M.apply(this, this.move),
- e: U.M.apply(this, this.end)
- });
- (UDE) && (U.Ut.AddObj(this, UDE));
- U.M.AddEvent("touchstart", UDOD, this.s);
- U.M.AddEvent("touchmove", UDOD, this.m); U.M.AddEvent("touchend", UDOD, this.e);
- }
- U.PH.up.init.prototype = {
- start: function () {
- (!this.obj.scrollTop) && (this.tf = true, this.entf = false, this.t = U.M.GetMousep());
- },
- move: function () {
- U.M.StopBubble();
- if (this.tf) {
- var _UDE = U.M.GetMousep(),
- _UTY = _UDE.Y - this.t.Y;
- if (_UTY > 0) {
- this.entf = _UTY;
- (U.Ut.isFunction(this.mcb)) && (this.mcb(_UTY));
- }
- else { this.entf = false; }
- }
- },
- end: function () {
- if (this.tf && this.entf && U.Ut.isFunction(this.cb)) { this.cb(this.entf); } this.tf = this.entf = this.t = null;
- if (this.sf) { U.M.ReEvent("touchstart", this.obj, this.s); U.M.ReEvent("touchmove", this.obj, this.m); U.M.ReEvent("touchend", this.obj, this.e); }
- }
- }
|