From 19dfc924588db682b6a3b454691036f1855c17cf Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 10 Jun 2014 12:29:48 +0200 Subject: [PATCH] Fixed ItemSet not updating on change in DataSet --- src/timeline/Range.js | 1 - src/timeline/component/ItemSet.js | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/timeline/Range.js b/src/timeline/Range.js index 252ec469..d90dc840 100644 --- a/src/timeline/Range.js +++ b/src/timeline/Range.js @@ -7,7 +7,6 @@ * @param {Object} [options] See description at Range.setOptions */ function Range(timeline, options) { - this.id = util.randomUUID(); this.start = null; // Number this.end = null; // Number diff --git a/src/timeline/component/ItemSet.js b/src/timeline/component/ItemSet.js index cdaf2b82..f5dc7101 100644 --- a/src/timeline/component/ItemSet.js +++ b/src/timeline/component/ItemSet.js @@ -26,26 +26,26 @@ function ItemSet(timeline, options) { // listeners for the DataSet of the items this.itemListeners = { 'add': function (event, params, senderId) { - if (senderId != me.id) me._onAdd(params.items); + me._onAdd(params.items); }, 'update': function (event, params, senderId) { - if (senderId != me.id) me._onUpdate(params.items); + me._onUpdate(params.items); }, 'remove': function (event, params, senderId) { - if (senderId != me.id) me._onRemove(params.items); + me._onRemove(params.items); } }; // listeners for the DataSet of the groups this.groupListeners = { 'add': function (event, params, senderId) { - if (senderId != me.id) me._onAddGroups(params.items); + me._onAddGroups(params.items); }, 'update': function (event, params, senderId) { - if (senderId != me.id) me._onUpdateGroups(params.items); + me._onUpdateGroups(params.items); }, 'remove': function (event, params, senderId) { - if (senderId != me.id) me._onRemoveGroups(params.items); + me._onRemoveGroups(params.items); } };