Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ var Graph = function (_Component) {
this.nodes.add(this.props.graph.nodes);
this.updateGraph();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.destroyGraph();
}
}, {
key: "shouldComponentUpdate",
value: function shouldComponentUpdate(nextProps, nextState) {
Expand Down Expand Up @@ -212,6 +217,11 @@ var Graph = function (_Component) {
this.nodes.add(nodesAdded);
this.nodes.update(nodesChanged);
}
}, {
key: "destroyGraph",
value: function destroyGraph() {
if (this.Network) this.Network.destroy();
}
}, {
key: "updateGraph",
value: function updateGraph() {
Expand Down
Loading