Browse Source

fix(timeline): Fix #2597 Zoom while dragging (#2645)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Fix mousewheel while dragging item bug
* Return removed lines
runTests
yotamberk 7 years ago
committed by Alexander Wunschik
parent
commit
c9312bb7ab
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      lib/timeline/component/ItemSet.js

+ 12
- 0
lib/timeline/component/ItemSet.js View File

@ -259,6 +259,8 @@ ItemSet.prototype._create = function(){
// right-click on timeline // right-click on timeline
this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this)); this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this));
this.body.dom.centerContainer.addEventListener('mousewheel', this._onMouseWheel.bind(this));
// attach to the DOM // attach to the DOM
this.show(); 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 * Handle updates of an item on double tap

Loading…
Cancel
Save