Vis.js: how to access the network inside an event handler?
问题 I'd like to use vis.js for displaying and editing a graph (hence storing its nodes, edges and options). To implement this, I need to save changes of the network (=graph) on various events. On of them is rearranging via drag and drop. Now, there's an on method which supports the dragEnd event meaning I can do stuff like network.on("dragEnd",saveToTiddlerAfterDragging); However what's passed to the handler is this object: { nodes: [Array of selected nodeIds], edges: [Array of selected edgeIds],