Browse Source

Merge pull request #2258 from almende/revert-2256-timeline-editableOverride

Revert "Timeline: options.editable to override item.editable"
codeClimate
yotamberk 8 years ago
committed by GitHub
parent
commit
4950efe92e
2 changed files with 4 additions and 2 deletions
  1. +2
    -1
      lib/timeline/component/ItemSet.js
  2. +2
    -1
      lib/timeline/component/item/Item.js

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

@ -1217,7 +1217,8 @@ ItemSet.prototype._onDragStart = function (event) {
if (item && (item.selected || this.options.itemsAlwaysDraggable)) { if (item && (item.selected || this.options.itemsAlwaysDraggable)) {
if (!this.options.editable.updateTime && if (!this.options.editable.updateTime &&
!this.options.editable.updateGroup) {
!this.options.editable.updateGroup &&
!item.editable) {
return; return;
} }

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

@ -146,7 +146,8 @@ Item.prototype.repositionY = function() {
* @protected * @protected
*/ */
Item.prototype._repaintDeleteButton = function (anchor) { Item.prototype._repaintDeleteButton = function (anchor) {
var editable = this.options.editable.remove &&
var editable = (this.options.editable.remove ||
this.data.editable === true) &&
this.data.editable !== false; this.data.editable !== false;
if (this.selected && editable && !this.dom.deleteButton) { if (this.selected && editable && !this.dom.deleteButton) {

Loading…
Cancel
Save