Browse Source

Removed redundant checks for item.editable in timeline (#2256)

@simo9000 Thanks!
codeClimate
Simon Morris 7 years ago
committed by Alexander Wunschik
parent
commit
ecf1cad571
2 changed files with 2 additions and 4 deletions
  1. +1
    -2
      lib/timeline/component/ItemSet.js
  2. +1
    -2
      lib/timeline/component/item/Item.js

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

@ -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;
}

+ 1
- 2
lib/timeline/component/item/Item.js View File

@ -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) {

Loading…
Cancel
Save