diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 31232bc9..94c5a3c8 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -1343,7 +1343,7 @@ ItemSet.prototype._onAddItem = function (event) { var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset this.options.onUpdate(itemData, function (itemData) { if (itemData) { - me.itemsData.update(itemData); + me.itemsData.getDataSet().update(itemData); } }); } @@ -1373,7 +1373,7 @@ ItemSet.prototype._onAddItem = function (event) { // execute async handler to customize (or cancel) adding an item this.options.onAdd(newItem, function (item) { if (item) { - me.itemsData.add(item); + me.itemsData.getDataSet().add(item); // TODO: need to trigger a redraw? } });