Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Trouble with absolute position of nodes inside containernode (Read 1732 times)
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Trouble with absolute position of nodes inside containernode
Sep 20th, 2016 at 6:45am
Print Post  
Hi,

I am trying to use ContainerNode to take in child diagrams into parent diagrams. Two problems:

Is there any way to get a 1:1 coordinate relationship between the local positioning of the node inside the ContainerNode and the absolute position on the parent diagram? So far I have the x position 1:1, but the y position is wrong because mindfusion really wants to add some hidden tab on the top of the ContainerNode.

Also, how do I find out the absolute position of the node within the ContainerNode (including the offset it is given because of the hidden ContainerNode "tab")?

Greetings,
Kim
  

img.png ( 9 KB | 71 Downloads )
img.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Trouble with absolute position of nodes inside containernode
Reply #1 - Sep 20th, 2016 at 9:12am
Print Post  
Hi,

There are no hidden tabs, but check if you aren't seeing the result of ContainerNode.Margin and CaptionHeight properties. Margin specifies how much space the container should leave around its children when auto-growing. CaptionHeight will be reserved on container's top side too, even if you are using a custom template that hides the caption bar. So in your case you might try setting both to 0.

Also note that child node's coordinates you specify via Bounds are relative to the diagram anyway, and not local for the container. We could add some kind of LocalBounds property if you prefer setting local coordinates for the container.

Regards,
Slavcho
Mindfusion
« Last Edit: Sep 20th, 2016 at 10:48am by Slavcho »  
Back to top
 
IP Logged
 
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Re: Trouble with absolute position of nodes inside containernode
Reply #2 - Sep 20th, 2016 at 9:25am
Print Post  
Hi,

Thanks! I have the Margin set to 0, but I had not yet found the CaptionHeight setting =)

Setting both to 0 gives me the expected behaviour.

I am happy using node positions relative to the diagram. I was just thrown off track when moving the ContainerNode resulted in this "strange" offset on the y axis due to the CaptionHeight being nonzero.

Greetings,
Kim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint