From b4967176956f1cd18d3b1a207c13d8f5fc61017a Mon Sep 17 00:00:00 2001 From: yotamberk Date: Mon, 17 Apr 2017 11:50:21 +0300 Subject: [PATCH] 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 --- lib/timeline/component/ItemSet.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 76f89e4b..fe2b46f6 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -2044,6 +2044,10 @@ ItemSet.prototype._onAddItem = function (event) { newItemData.end = snap ? snap(end, scale, step) : end; } } else { + newItemData = { + start: snap ? snap(start, scale, step) : start, + content: 'new item' + }; newItemData[this.itemsData._fieldId] = util.randomUUID(); // when default type is a range, add a default end date to the new item