Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how to make a groupNode which can contain nodes with links ? (Read 1712 times)
heyx
Junior Member
**
Offline


I Love MindFusion!

Posts: 69
Joined: Oct 9th, 2014
how to make a groupNode which can contain nodes with links ?
Apr 2nd, 2015 at 2:26am
Print Post  
hi,
   I use AttachTo method crate a GroupNode. but if the node has linked with other node. I don't know how to attach the link  to GroupNode.
  Could you please give me some help?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to make a groupNode which can contain nodes with links ?
Reply #1 - Apr 2nd, 2015 at 9:23am
Print Post  
Hi,

Links cannot be attached to a group. If they connect two nodes attached to same corner of master, they should still follow the master node when moved (with all control points translated by master's offset).

Code
Select All
void CreateTestGroup()
{
	var main = diagram.Factory.CreateShapeNode(50, 50, 200, 200);

	var child1 = diagram.Factory.CreateShapeNode(70, 70, 30, 30);
	child1.AttachTo(main, AttachToNode.TopLeft);
	var child2 = diagram.Factory.CreateShapeNode(180, 150, 30, 30);
	child2.AttachTo(main, AttachToNode.TopLeft);

	diagram.Factory.CreateDiagramLink(child1, child2).SegmentCount = 4;
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint