02-12-2016 04:06 AM
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
Solved! Go to Solution.
02-12-2016 10:05 AM
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
02-12-2016 10:05 AM
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
02-23-2016 05:53 AM
Hi Aikepaer,
That works perfect. Nice to see, that Next is running in JSFiddle now too.
Thanks
Markus
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