|
|
@ -547,4 +547,25 @@ Timeline.prototype.getEventProperties = function (event) { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Extend the drag event handler from Core, move the timeline vertically |
|
|
|
* @param {Event} event |
|
|
|
* @private |
|
|
|
*/ |
|
|
|
Timeline.prototype._onDrag = function (event) { |
|
|
|
// refuse to drag when we where pinching to prevent the timeline make a jump
|
|
|
|
// when releasing the fingers in opposite order from the touch screen, and refuse
|
|
|
|
// to drag when an item is already being dragged
|
|
|
|
if (!this.touch.allowDragging || this.itemSet.touchParams.itemIsDragging) return; |
|
|
|
|
|
|
|
var delta = event.deltaY; |
|
|
|
|
|
|
|
var oldScrollTop = this._getScrollTop(); |
|
|
|
var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); |
|
|
|
|
|
|
|
if (newScrollTop != oldScrollTop) { |
|
|
|
this.emit("verticalDrag"); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = Timeline; |