diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 948f5758..9d93d792 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -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;