Commit 282aafe7 authored by hbcui1984's avatar hbcui1984

增加hold、release事件的初始化配置,默认不监听

parent 003cc9c7
...@@ -1167,7 +1167,7 @@ var mui = (function(document, undefined) { ...@@ -1167,7 +1167,7 @@ var mui = (function(document, undefined) {
case $.EVENT_END: case $.EVENT_END:
case $.EVENT_CANCEL: case $.EVENT_CANCEL:
clearTimeout(timer); clearTimeout(timer);
if (touch.hold) { if ($.options.gestureConfig.hold && touch.hold) {
$.trigger(event.target, 'release', touch); $.trigger(event.target, 'release', touch);
} }
break; break;
...@@ -1196,6 +1196,7 @@ var mui = (function(document, undefined) { ...@@ -1196,6 +1196,7 @@ var mui = (function(document, undefined) {
tap: true, tap: true,
doubletap: false, doubletap: false,
longtap: false, longtap: false,
hold: false,
flick: true, flick: true,
swipe: true, swipe: true,
drag: true drag: true
...@@ -4164,6 +4165,10 @@ var mui = (function(document, undefined) { ...@@ -4164,6 +4165,10 @@ var mui = (function(document, undefined) {
if (this.scroller) { if (this.scroller) {
this.startX = this.lastX; this.startX = this.lastX;
this.isDragging = true; this.isDragging = true;
$.gestures.touch.lockDirection = true; //锁定方向
$.gestures.touch.startDirection = detail.direction;
this.scroller.classList.remove(CLASS_TRANSITIONING); this.scroller.classList.remove(CLASS_TRANSITIONING);
this.offsetX = this.getTranslateX(); this.offsetX = this.getTranslateX();
this._initOffCanvasVisible(); this._initOffCanvasVisible();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment