Browse Source

fixed destroy

v3_develop
Alex de Mulder 10 years ago
parent
commit
379a9c3d38
2 changed files with 6316 additions and 6316 deletions
  1. +6310
    -6310
      dist/vis.js
  2. +6
    -6
      lib/network/Network.js

+ 6310
- 6310
dist/vis.js
File diff suppressed because it is too large
View File


+ 6
- 6
lib/network/Network.js View File

@ -841,17 +841,17 @@ Network.prototype._createKeyBinds = function() {
}
};
/**
* Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.
* var network = new vis.Network(..);
* network.destroy();
* network = null;
*/
Network.prototype.destroy = function() {
this.start = function () {};
this.redraw = function () {};
this.timer = false;
setTimeout(this._destroy.bind(this), 10);
}
Network.prototype._destroy = function() {
// remove keybindings
this.keycharm.reset();

Loading…
Cancel
Save