This project is read-only.

Is it just me or is Compound graphs having trouble with displaying edges correctly?

Jun 30, 2010 at 1:44 PM
When I try out the Sample-application which comes with the source-code the compound graphs are displaying the edges offset:ed / displaced. Is there a solution available for this? Kind regards Richard
Jun 30, 2010 at 3:48 PM
Once again. An answer to my own question... =O) It seems like the example is generating a compound graph that doesn't display correctly. However when I manually add vertices and edges according to my requirements (no compounds in compounds) no edge problem seems occur. A snag though is that the edge shoots off if I try to drag a vertex inside a compound where that vertex is the only child in that compound. My hack-solution is to disable dragging for any single child-item by attaching a global / class MouseDown-listener to the VertexControl-type and execute the following code: VertexControl vc= sender as VertexControl; PocVertex parent = graph.GetParent(vc.Vertex as PocVertex); if(parent != null && graph.GetChildrenCount(parent) < 2) e.Handled = true; Kind regards, Richard
Jul 7, 2010 at 9:25 AM
Edited Jul 7, 2010 at 2:10 PM
Ok - so the problem reoccurs when the number of nodes / compound nodes are many. I would really like to have the CompoundFDP algorithm's kind of a showstopper here... It seems that any combination of parent / child vertices that amounts to about 190 vertices fails (not always though). Why.....Do I need to set / change any layout-parameters? Kind Regards Richard
Jul 8, 2010 at 2:06 PM
This is an extreme hack but seems to resolve the issue with a large number of nodes / compound nodes. The animation dissappears though but we need to move on so this "solution" have to do for now. In GraphSharp.Controls.CompoundVertexControl.OnPositionChanged I commented out the entire block of code in the else case (when compoundVertexControl != args.OriginalSource). Result: The nodes are layed out correctly and animated when the number of items are few. When the total number of nodes are large (above 200) the nodes are layed out correctly but no animation is done to get there. Kind regards Richard