|
|
@ -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); |
|
|
|