From ecf1cad5712270de26ef5d19f7a298315fa92db4 Mon Sep 17 00:00:00 2001 From: Simon Morris Date: Fri, 4 Nov 2016 01:18:27 -0700 Subject: [PATCH] Removed redundant checks for item.editable in timeline (#2256) @simo9000 Thanks! --- lib/timeline/component/ItemSet.js | 3 +-- lib/timeline/component/item/Item.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 0bd8cb86..9f4fc7a7 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -1211,8 +1211,7 @@ ItemSet.prototype._onDragStart = function (event) { if (item && (item.selected || this.options.itemsAlwaysDraggable)) { if (!this.options.editable.updateTime && - !this.options.editable.updateGroup && - !item.editable) { + !this.options.editable.updateGroup) { return; } diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index 819f982c..08727bed 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -145,8 +145,7 @@ Item.prototype.repositionY = function() { * @protected */ Item.prototype._repaintDeleteButton = function (anchor) { - var editable = (this.options.editable.remove || - this.data.editable === true) && + var editable = this.options.editable.remove && this.data.editable !== false; if (this.selected && editable && !this.dom.deleteButton) {