Hi Mindfusion.
I'm trying to add a shape to links, and in most cases it works with success, but some of them are unfortunately misplaced.
Please see the example below:
[code] ShapeNode newShape1 = diagram.Factory.CreateShapeNode(40, 40, 20, 20, Shapes.Rectangle);
newShape1.Expandable = true;
for (int a=0; a<10; a++)
{
ShapeNode newShape = diagram.Factory.CreateShapeNode(0, 0, 20, 20, Shapes.Rectangle);
DiagramLink link = diagram.Factory.CreateDiagramLink(newShape1, newShape);
ShapeNode label = diagram.Factory.CreateShapeNode(0, 0, 10, 10, Shapes.Star);
label.AttachTo(link, AttachToLink.LongestHSegment, 1);
link.SubordinateGroup.Expandable = true;
}
TreeLayout layout = new TreeLayout { Type = TreeLayoutType.Centered, Direction = TreeLayoutDirections.TopToBottom, LevelDistance = 100 };
layout.Arrange(diagram); [/code]
[img]http://i736.photobucket.com/albums/xx8/DKHMM/mindfusionError1.jpg[/img]
If I try to change the link with the mouse pointer, it is working, but as soon as I rearrange the layout, some of the shapes are misplaced.
Looking forward to see your reply.
Best regards Henrik
|