Browse Source

fix(timeline): #2522 Right button while dragging item makes items uneditable (#2582)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix right click button bug when dragging item
v4.18
yotamberk 8 years ago
committed by Alexander Wunschik
parent
commit
2b913d0b62
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/timeline/component/ItemSet.js

+ 3
- 1
lib/timeline/component/ItemSet.js View File

@ -256,6 +256,8 @@ ItemSet.prototype._create = function(){
this.body.dom.centerContainer.addEventListener('mouseover', this._onMouseOver.bind(this));
this.body.dom.centerContainer.addEventListener('mouseout', this._onMouseOut.bind(this));
this.body.dom.centerContainer.addEventListener('mousemove', this._onMouseMove.bind(this));
// right-click on timeline
this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this));
// attach to the DOM
this.show();
@ -1590,6 +1592,7 @@ ItemSet.prototype._moveToGroup = function(item, groupId) {
* @private
*/
ItemSet.prototype._onDragEnd = function (event) {
this.touchParams.itemIsDragging = false;
if (this.touchParams.itemProps) {
event.stopPropagation();
@ -1597,7 +1600,6 @@ ItemSet.prototype._onDragEnd = function (event) {
var dataset = this.itemsData.getDataSet();
var itemProps = this.touchParams.itemProps ;
this.touchParams.itemProps = null;
this.touchParams.itemIsDragging = false;
itemProps.forEach(function (props) {
var id = props.item.id;

Loading…
Cancel
Save