Network animation on load
Hi, I'd like to add a fly in animation on the network, starting very much zoomed in on one node, than zooming out to fit. However, it should run only once, when the page is loaded. I tried to set the initial zoom level with the beforeDrawing event, but that event triggers apparently over and over again, which makes it return to this position each time you try to move or zoom out.
network.on("beforeDrawing", function() {
network.focus(0, {scale:7});
});
I also tried with javacript window.onload, but I think that triggers too early, so nothing happens.
Any suggestions how to do this?