Closed D-Niermann closed 3 years ago
I assume you have something like,
const model = new DiagramModel();
const engine = createEngine();
engine.setModel(model);
to get the nodes
const nodes = engine.getModel().getNodes();
const links = engine.getModel().getLinks();
Thanks! So I guess I have to iterate all Nodes myself. It's ok, but I thought maybe there is already a structured tree stored internally somewhere.
Hello, after I add nodes per drag and drop to the graph and link them, I want to iterate through all nodes. Currently I do it in a very hacky manor by getting the children of the html elements, which also doesnt support all graph structures.
Is there a variable somewhere that stores the nodes and their respective links?
Thanks!