|
|
@ -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(); |
|
|
|
|
|
|
|