From 2f2f5c4cc88e6874681be3de366174e389089c8e Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Tue, 25 Oct 2016 20:54:56 +0300 Subject: [PATCH] Commit before pull --- lib/timeline/Timeline.js | 1 + lib/timeline/component/item/Item.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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);