02-14-2016 01:18 PM
Hello,
I am trying to load additional topology items to an existing topology, but I have the following problems:
1) Links from new Nodes to existing NodeSets are invisible until the existing NodeSet is expanded:
Before:
After:
2) How can I add NodeSets?
I tried to leverage Alex's nag-app example but I am unable to add NodeSets.
Code:
nx.each(data.nodeSet, function (nodeSetData) | |
{ | |
var nSet = topology.getLayer('nodeSet').getNodeSet(nodeSetData.id); | |
if (typeof (nSet) == 'Array') | |
{ | |
// Todo | |
} | |
else | |
{ | |
topology.addNodeSet(nodeSetData); | |
} | |
}); |
Thanks,
Mathias
Solved! Go to Solution.
03-02-2016 03:52 PM
Hi Mathias,
It is a bug and I fixed in latest version. If you are using 0.9.0 you can refer this demo for a quick fix.
http://jsfiddle.net/nextsupport/q4ttxcsq/
Invoke this when you call addLink
var edgeSet = topo.graph().getEdgeSetBySourceAndTarget(0, 4)
if (edgeSet) {
topo.graph()._generateConnection(edgeSet)
}
Abu
02-15-2016 04:42 PM
hi Mathias,
1) this could be a bug, I will update in the latest code. Here is a work around.
http://jsfiddle.net/nextsupport/q4ttxcsq/
2) You can refer this demo
http://jsfiddle.net/nextsupport/q4ttxcsq/
Abu
02-29-2016 12:43 PM
Hi Abu,
regarding problem #1: Have you had a chance to look into it?
Thanks,
Mathias
03-02-2016 03:52 PM
Hi Mathias,
It is a bug and I fixed in latest version. If you are using 0.9.0 you can refer this demo for a quick fix.
http://jsfiddle.net/nextsupport/q4ttxcsq/
Invoke this when you call addLink
var edgeSet = topo.graph().getEdgeSetBySourceAndTarget(0, 4)
if (edgeSet) {
topo.graph()._generateConnection(edgeSet)
}
Abu
03-04-2016 11:43 AM
Hi Abu,
thank you for your help - it'w working!
/Mathias
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide