- From: Eduardo Lidanski <eduardo.lidanski AT pikolab.net>
- To: graphstream-users AT litislab.fr
- Subject: Flickering while adding nodes
- Date: Wed, 13 Nov 2013 17:18:31 +0100
Hi,
I have a graph where I add nodes constantly and after some few time
after each graph.addNode() operation I add an edge of the node.
So I have:
Node n = graph.addNode()
//some time passes
Edge n_a = graph.addEdge()
Normally, the time between adding the node and adding its edge is less
than 1 second, but in my application I cannot know that for advance,
since it is possible that no edge is being added.
it works well, but each time a node is added, the whole graph flickers
... so it is very annoying.
I think that is because the node adds itself at the upper right corner
of the graph, a second after that it adds its edge, and this causes the
flickering.
But do you know what can I do to prevent the flickering ?
I tried to create a thread that adds the node and the edge together
after 1 second if an edge has been found in that second. If not, it adds
the node alone. This prevents the flickering, but is not good for my
application.
What else could I do?
I noticed the node appears at the very far end up, so the graph becomes
for a small second very small, and then the graph appears with its
normal size again. I think the node is appearing veeery far away, that
is why the graph changes its actual size for a second. How can I limit
this?
Thanks
Eduardo
- Flickering while adding nodes, Eduardo Lidanski, 13/11/2013
Archives gérées par MHonArc 2.6.16.