cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1269
Views
1
Helpful
4
Replies

Loading additional NodeSets

mspoerr
Level 4
Level 4

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

4 Replies 4

aaikepae
Cisco Employee
Cisco Employee

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

Hi Abu,

regarding problem #1: Have you had a chance to look into it?

Thanks,

Mathias

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

Hi Abu,

thank you for your help - it'w working!

/Mathias