将mui.min.js中的_drag:function(c)方法中的左右滚动的代码删掉就好了,但是其他的地方需要用到,求如何重写下面的_drag方法,让其pdf在左右滑动的时候执行到重写的方法,而不是mui.min.js中的方法
mui.Class.extend({
_drag: function(c) {
var d = c.detail;
if ((this.options.scrollY || "up" === d.direction || "down" === d.direction) && a.os.ios && parseFloat(a.os.version) >= 8) {
var e = d.gesture.touches[0].clientY;
if (e + 10 > b.innerHeight || 10 > e) return void this.resetPosition(this.options.bounceTime)
}
var f = isReturn = !1;
this._getDirectionByAngle(d.angle);
if ("left" === d.direction || "right" === d.direction ? this.options.scrollX ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollY && !this.moved && (isReturn = !0) : "up" === d.direction || "down" === d.direction ? this.options.scrollY ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollX && !this.moved && (isReturn = !0) : isReturn = !0, (this.moved || f) && (c.stopPropagation(), d.gesture && d.gesture.preventDefault()), !isReturn) {
alert("sss")
}
}
});
1 个回复
1***@qq.com
怎么解决的???打开pdf~~~~求指导