diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 9d93d792..38bb7028 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -259,6 +259,8 @@ ItemSet.prototype._create = function(){ // right-click on timeline this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this)); + this.body.dom.centerContainer.addEventListener('mousewheel', this._onMouseWheel.bind(this)); + // attach to the DOM this.show(); }; @@ -1953,6 +1955,16 @@ ItemSet.prototype._onMouseMove = function (event) { } }; +/** + * Handle mousewheel + * @param event + * @private + */ +ItemSet.prototype._onMouseWheel = function(event) { + if (this.touchParams.itemIsDragging) { + this._onDragEnd(event); + } +} /** * Handle updates of an item on double tap