marklogic-community / grove-vue-visjs-graph

Vue component to visualize RDF relationships and Timelines using Vis.js
https://grtjn.github.io/ml-visjs-graph.js/
Other
6 stars 3 forks source link

Expand not working if iri already found as leaf in nodes cache #7

Open grtjn opened 5 years ago

grtjn commented 5 years ago

Keep track which nodes have been expanded, by adding this right after first sparql call:

  newIris.forEach(function(iri) {
    nodes[iri].expanded = true;
  });

And then use this to filter which iris need processing:

  if (!nodes[iri] || !nodes[iri].expanded) {