Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to re-size container recursively (Read 1633 times)
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
How to re-size container recursively
Apr 24th, 2013 at 6:52am
Print Post  
Hi,

I have 3 nested container nodes. When i re-size the top child container it will automatically res-size its parent container, but in turn its not re-sizing the root parent.

I want to re-size the whole parent container nodes when i re-size a child container.
The same thing i need to have when i add a child node to the container also.

In short how can i re-size the nested parent containers while re-sizing and adding new child container/ any nodes?

Thanks
Kiran B
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to re-size container recursively
Reply #1 - Apr 24th, 2013 at 1:16pm
Print Post  
Hi,

Use this as a work-around for the time being:

Code
Select All
var originalResize = ContainerNode.prototype.resizeToFitChildren;
ContainerNode.prototype.resizeToFitChildren = function (allowShrink)
{
	originalResize.apply(this, allowShrink);
	if (this.container)
		this.container.onChildModified(this, 0);
}; 



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