diff --git a/HISTORY.md b/HISTORY.md index 56a3270a..9fb85421 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,13 @@ http://visjs.org +## not yet released, version 4.0.1-SNAPSHOT + +### Timeline, Graph2d + +- Fixed #872: error about deprecated function `unsubscribe`. + + ## 2015-05-22, version 4.0.0 ### General diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 0d8a96a4..0760ddef 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -708,7 +708,7 @@ ItemSet.prototype.setGroups = function(groups) { // unsubscribe from current dataset if (this.groupsData) { util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.unsubscribe(event, callback); + me.groupsData.off(event, callback); }); // remove all drawn groups diff --git a/lib/timeline/component/LineGraph.js b/lib/timeline/component/LineGraph.js index 891f1954..ec3108e3 100644 --- a/lib/timeline/component/LineGraph.js +++ b/lib/timeline/component/LineGraph.js @@ -324,7 +324,7 @@ LineGraph.prototype.setGroups = function(groups) { // unsubscribe from current dataset if (this.groupsData) { util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.unsubscribe(event, callback); + me.groupsData.off(event, callback); }); // remove all drawn groups