Browse Source

Add element to templates options

codeClimate
Yotam Berkowitz 8 years ago
parent
commit
89a0bfd36a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      lib/timeline/component/Group.js
  2. +1
    -1
      lib/timeline/component/item/Item.js

+ 1
- 1
lib/timeline/component/Group.js View File

@ -88,7 +88,7 @@ Group.prototype.setData = function(data) {
// update contents
var content;
if (this.itemSet.options && this.itemSet.options.groupTemplate) {
content = this.itemSet.options.groupTemplate(data);
content = this.itemSet.options.groupTemplate(data, this.dom.inner);
}
else {
content = data && data.content;

+ 1
- 1
lib/timeline/component/item/Item.js View File

@ -190,7 +190,7 @@ Item.prototype._updateContents = function (element) {
var content;
if (this.options.template) {
var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset
content = this.options.template(itemData);
content = this.options.template(itemData, element);
}
else {
content = this.data.content;

Loading…
Cancel
Save