diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index ef47d28f..9b2576cd 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -111,6 +111,7 @@ function Timeline (container, items, groups, options) { } // item set + console.log("aaaaaaaaaa", this.options, options); this.itemSet = new ItemSet(this.body, this.options); this.components.push(this.itemSet); diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index c12a3203..27c90271 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -188,7 +188,7 @@ Item.prototype._repaintDeleteButton = function (anchor) { Item.prototype._updateContents = function (element) { var content; var templateFunction; - + console.log(this.options); if (this.options.template) { var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset templateFunction = this.options.template.bind(this); @@ -197,7 +197,9 @@ Item.prototype._updateContents = function (element) { content = this.data.content; } - if (content instanceof Object) { + console.log(content); + console.log("content: " , content, content instanceof Object, !(content instanceof Element)); + if ((content instanceof Object) && !(content instanceof Element)) { templateFunction(itemData, element) } else { var changed = this._contentToString(this.content) !== this._contentToString(content);