Browse Source

Fix doubleclick add (#2987)

* Fix redraw order

* Fix error when option is not defined

* Allow template labels

* Add .travis.yml file

* Add experiment travis code

* Fix react example

* Fix adding items with double click
gemini
yotamberk 7 years ago
committed by GitHub
parent
commit
b496717695
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lib/timeline/component/ItemSet.js

+ 4
- 0
lib/timeline/component/ItemSet.js View File

@ -2044,6 +2044,10 @@ ItemSet.prototype._onAddItem = function (event) {
newItemData.end = snap ? snap(end, scale, step) : end; newItemData.end = snap ? snap(end, scale, step) : end;
} }
} else { } else {
newItemData = {
start: snap ? snap(start, scale, step) : start,
content: 'new item'
};
newItemData[this.itemsData._fieldId] = util.randomUUID(); newItemData[this.itemsData._fieldId] = util.randomUUID();
// when default type is a range, add a default end date to the new item // when default type is a range, add a default end date to the new item

Loading…
Cancel
Save