Trying to load additional topology items to an existing topology, but have the following problems:
1) Links from new Nodes to existing NodeSets are invisible until the existing NodeSet is expanded:
Before:
After:
2) How to add NodeSets.
Tried to leverage nag-app example but 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); | |
} | |
}); |
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
- Regarding problem #1: Have you had a chance to look into it?
It is a bug and got 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)
}
Comments
0 comments
Please sign in to leave a comment.