Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resize a node with attached nodes (Read 3021 times)
Cornel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Dec 17th, 2008
Resize a node with attached nodes
Aug 14th, 2009 at 1:48pm
Print Post  
Hi All,
I have a node (rectangle) with some attached nodes inside of it. Moving the master node works ok: the children are also moved.
The problem I have is that children are moved also when I resize the master top or left edges (children are attached TopLeft).
How could I avoid the children movement when resizing the parent?

Thanks,
Cornel
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resize a node with attached nodes
Reply #1 - Aug 14th, 2009 at 3:19pm
Print Post  
Hi,

That's what expected from the TopLeft attachment type, it preserves the original distance from the child nodes to the master's top-left point. With all types, children positions are relative to the positions of either a corner or side of the master node. You might try dynamically changing the attachment type depending on which handle is being dragged, e.g. change it to BottomRight when the user grabs the top-left handle.

Stoyan
  
Back to top
 
IP Logged
 
Cornel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Dec 17th, 2008
Re: Resize a node with attached nodes
Reply #2 - Aug 17th, 2009 at 12:27pm
Print Post  
Hi Stoyan,
I managed to handle it this way: at start resizing a node, I re-attach again all its attached nodes using GroupAnchorStyles= 0 (which doesn’t exist in the enum); then, at finishing the resize I set again GroupAnchorStyles to Top|Left.

And it works well. Thanks for your suggestion.

Now, I have another problem, namely with the links that are drawn inside master node: when I move the master node the ends of the links move along with their origins and destinations, but the intermediate control points do not Sad.
I saw in the demo that containers behave well in this respect, but I don’t know how to make it work also for regular nodes (we could not use container nodes because we need to attach nodes on the border of the container and we didn't find any way do this; by the way, is this possible?).

In fact what is required is as follows: when moving a master node all link segments that are inside that master should also be moved.

Do you have any suggestions regarding this?
Thanks,
Cornel
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resize a node with attached nodes
Reply #3 - Aug 17th, 2009 at 3:42pm
Print Post  
Hi Cornel,

Moving the link segments is implemented only for child nodes added using
the AttachTo(node, AttachToNode) method. Anyway in the next day or two we'll add an AttachTo overload that will move child nodes only when the master is moved.

Attaching nodes on the border of a container should be possible using the container's AttachTo method. With container.Add you can add children near the border if Margin is set to 0, but they must be entirely inside the container.

Stoyan
  
Back to top
 
IP Logged
 
Cornel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Dec 17th, 2008
Re: Resize a node with attached nodes
Reply #4 - Aug 18th, 2009 at 9:00am
Print Post  
Hi Stoyan,
It works well using AttachTo(node, AttachToNode).
Thanks.

Cornel
  
Back to top
 
IP Logged
 
srinivas
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 41
Joined: Jul 27th, 2010
Re: Resize a node with attached nodes
Reply #5 - Aug 19th, 2010 at 2:02pm
Print Post  
Hi Stoyan,

I would like to know which overload method mentioned in your last post can be used to move child nodes only when master is moved.

I am using latest Diagramming control version 5.3.5 and not finding such overload method.

I posted this on other topic before finding this as I have issue with the attached nodes moving when I resize the group node.

Velidanda
« Last Edit: Aug 20th, 2010 at 9:52am by srinivas »  
Back to top
 
IP Logged
 
srinivas
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 41
Joined: Jul 27th, 2010
Re: Resize a node with attached nodes
Reply #6 - Aug 21st, 2010 at 2:09pm
Print Post  
Hi,

Got this working posted in other topic. tried handling startnodemodifying event and based on the adjustment handle clicked attaching the nodes to different location fixed the problem with nodes moving when resizing group box or a node that has some nodes attached to it.

Velidanda
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint