|
@ -188,7 +188,7 @@ Item.prototype._repaintDeleteButton = function (anchor) { |
|
|
Item.prototype._updateContents = function (element) { |
|
|
Item.prototype._updateContents = function (element) { |
|
|
var content; |
|
|
var content; |
|
|
var templateFunction; |
|
|
var templateFunction; |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.options); |
|
|
if (this.options.template) { |
|
|
if (this.options.template) { |
|
|
var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset
|
|
|
var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset
|
|
|
templateFunction = this.options.template.bind(this); |
|
|
templateFunction = this.options.template.bind(this); |
|
@ -197,7 +197,9 @@ Item.prototype._updateContents = function (element) { |
|
|
content = this.data.content; |
|
|
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) |
|
|
templateFunction(itemData, element) |
|
|
} else { |
|
|
} else { |
|
|
var changed = this._contentToString(this.content) !== this._contentToString(content); |
|
|
var changed = this._contentToString(this.content) !== this._contentToString(content); |
|
|