Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Bounds for nodes in container (Read 1258 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Bounds for nodes in container
Apr 21st, 2010 at 1:14pm
Print Post  
Hi Stoyo

In my application, I am saving the diagram in my custom xml and while displaying I have my own logic for p rocessing and setting the bounds [i am not using serilization]

With this code, I have container and child items inside it. For child items KeepInside parent constrian is specified.

Now I wanted to know, when the bounds are returned from the nodes which is inside the container , their left/top is returned relative to container bounds or diagram bounds.

Do I need to consider the containers left/top position while setting the child nodes left/top ?

Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Bounds for nodes in container
Reply #1 - Apr 21st, 2010 at 1:27pm
Print Post  
Hi Rajesh,

The child node's Bounds is not relative to the container, it is specified in diagram coordinates. However if you set a container's Bounds, that moves the children too, so you can use the Bounds setter when loading only if all containers are placed before their children. If that's the problem, use the SetBounds(rect, false) method instead.

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