From 03d0e258c6044d5f2f681ace63ced404b8393270 Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 26 May 2015 09:24:18 +0200 Subject: [PATCH] Fixed #872: error about deprecated function `unsubscribe` --- HISTORY.md | 7 +++++++ lib/timeline/component/ItemSet.js | 2 +- lib/timeline/component/LineGraph.js | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) 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