diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index fa843ceff..5589e73f6 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -138,7 +138,7 @@ Core.prototype._create = function (container) { this.hammer = new Hammer(this.dom.root); var pinchRecognizer = this.hammer.get('pinch').set({enable: true}); pinchRecognizer && hammerUtil.disablePreventDefaultVertically(pinchRecognizer); - this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL}); this.listeners = {}; var events = [ diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index 73b1895a4..6c7820df7 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -105,7 +105,7 @@ CustomTime.prototype._create = function() { this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_ALL }); } }; diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 5e615b7af..9363ec3fc 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -267,7 +267,7 @@ ItemSet.prototype._create = function(){ this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL}); // single select (or unselect) when tapping an item this.hammer.on('tap', this._onSelectItem.bind(this));