Vis.js network: how to extract customized options of a node (and an edge)?
问题 I'm developing a simplistic graph editor using vis.js/network. Since an editor has to store the network state, I have a saving helper where I extract data from a network and store it as JSON. For now, I use seemingly quite an ugly/hacky way to extract data for storage: // get nodes and edges var nodes = network.body.data.nodes._data; // brief ones; network.body.nodes contain much more stuff (x,y, default stuff) //# look for a suitable getter var edges = network.body.data.edges._data; //