cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1531
Views
1
Helpful
2
Replies

change visibility of Nodes

m.rainer
Beginner
Beginner

Hi,

I am trying to change visibility of nodes in the topology.

I am able to set node._model.visible(false)

Then it's gone. But my problem is, after that I can not find that node in this.view('topo') in my nx.graphic.Topology any more.

So I am not able to make it visible again.

What I am really looking for is the complete topology (if possible not only this view) including all nodes that model is set to invisible.

Any idea?

Thanks a lot

Markus

1 Accepted Solution

Accepted Solutions

aaikepae
Cisco Employee
Cisco Employee

Hi Markus,

If you set the node's visible to false, topology will remove that node from stage, and you will lost the refference to that node.

There are two way you can toggle nodes's visibility

1. Refer to this demo : toggle node - JSFiddle Use vertex (node's model) to control it's visibility

2. Similar to to 1st one, but set to variable to node's model, and control it's visibility

var node_1_model = topo.getNode(1).model()

//hide

node_1_model.visible(false);

//show

node_1_model.visible(true);



Abu

View solution in original post

2 Replies 2

aaikepae
Cisco Employee
Cisco Employee

Hi Markus,

If you set the node's visible to false, topology will remove that node from stage, and you will lost the refference to that node.

There are two way you can toggle nodes's visibility

1. Refer to this demo : toggle node - JSFiddle Use vertex (node's model) to control it's visibility

2. Similar to to 1st one, but set to variable to node's model, and control it's visibility

var node_1_model = topo.getNode(1).model()

//hide

node_1_model.visible(false);

//show

node_1_model.visible(true);



Abu

Hi Aikepaer,

That works perfect. Nice to see, that Next is running in JSFiddle now too.

Thanks

Markus

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers