I have created a Vis.js Network graph with various nodes and edges, with its initial options, etc.
At some point, on user input, I update its options, e.g. like that (where GraphView is the Vis.js Network instance) :
GraphView.setOptions({
interaction:{
hideEdgesOnDrag:true
}
})
The change does take effect, but the result is totally non-optimal: it suddenly becomes extremely slow. I've even tried calling GraphView.redraw() after the above options change, but still to no avail.
The only thing that works is to completely destroy the graph and re-create it from scratch. But then, the node layout is completely messed up (and different than the initial one), although all that should change is whether edges are visible when the user drags a node.
Any ideas? Am I doing something wrong?