Open GoogleCodeExporter opened 9 years ago
Hi,
the code was not tested thoroughly for dynamic insertion or deletion of nodes
and
edges, although the VisualGraph class provides methods to do so (you already
mentioned
them). Further the demo application itself is designed to always require a valid
graph object, so yes it would break if you have no more nodes or not even a root
node (the layouters all require a spanning tree and thus a root node). That is
not a
strict limitation of the graphLayout library, but there are some bits and pieces
missing in order to fully generalise it that way.
If you want to use different graphs you can try the following:
- create one or more GraphML files
- you can obtain corresponding XML objects using <mx:HTTPService>, there is
a commented section in the Demo application code.
- if you want to switch the XML objects, you need to make sure you stop
any existing layouting operations (or animations), the "resetAll();"
method of the Layouter should do it (in theory).
- Then you would need to remove the existing Graph object from the VisualGraph
and replace it with a new Graph object, that is being initialised with
your other XML file.
- repeat the initialisation of the VisualGraph (those you think are required), I
think all the currently visible nodes and edges datastructures would need to
be purged and there is not really any infrastructure there, yet, to do this....
- reinit a layouter and then you would be able to display a different Graph.
As you can see, there are still some pieces missing to easily change out the
underlying data. We will continue to work on that of course, but we also invite
the community to send us patches for any improvements and enhancements you
can imagine.
I keep this issue open until we have some progress here.
Thanks,
Daniel
Original comment by spo...@gmail.com
on 30 Aug 2007 at 7:20
[deleted comment]
Trying to follow the methodology described
private function clearVGraph():void {
myData.removeAll();
layouter.resetAll();
vgraph.clearHistory();
vgraph.removeAllChildren();
myHTTPService.send();
}
This doesn't seem to work, what would I be missing?
Original comment by marc.ris...@gmail.com
on 7 Oct 2007 at 12:08
Hi,
yes, there are issues related to the modification of the node base.
I will see if I find the time soon to look at it.
It would be very helpful to have a kind of demo application that explicitly
demonstrates the error/crash.
Marc, could you possibly provide one?
Original comment by spo...@gmail.com
on 21 Mar 2008 at 3:14
I am also working on something similar. The graph works great until I try to
change
the XML. What I have done is changed the data provider to be a variable in the
actual program instead of an external file, then I dynamically rewrite the
variable,
any attempt to reinitialize the graph, however, does not work. Are there any
more
updates or changes to this issue that I may be able to benefit from?
Thanks, and awesome work on this, its a really useful tool.
Original comment by landry.j...@gmail.com
on 30 Jun 2008 at 6:08
Original issue reported on code.google.com by
lecontac...@gmail.com
on 29 Aug 2007 at 10:19