Using NetronSourceCodev21.zip, creating a 3-node graph which uses
StringEmbedder and AllowMoveShape = true the application freezes after
some 1-5 "moves" of nodes. Code-excerpt at the bottom of the mail.
This is probably related to me missing synchronization or something,
perhaps the layout should be disabled while moving? Anyone got a hint on
how to resolve this situation.
private Netron.GraphLib.UI.GraphControl visiblegraph;
[...lots cutted...]
public Form1()
{
InitializeComponent();
visiblegraph.AddLibrary("BasicShapes.dll");
visiblegraph.AllowMoveShape = true;
visiblegraph.GraphLayoutAlgorithm =
Netron.GraphLib.GraphLayoutAlgorithms.SpringEmbedder;
visiblegraph.EnableLayout = true;
Shape[] shapes = new Shape[3];
for (int i = 0; i < shapes.Length; ++i)
shapes[i] = visiblegraph.AddNode(
i.ToString(),
new PointF(10.0F*i, 50.0F*i));
for ( int i = 0; i < shapes.Length; ++i )
visiblegraph.AddEdge(
shapes[i].Connectors[0],
shapes[(i+1)%shapes.Length].Connectors[0]);
}
[...lots cutted...]
--
Helge
|