Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Ensuring Diagram does not become too small to show all items on it (Read 3356 times)
AR
Junior Member
**
Offline


I Love MindFusion!

Posts: 65
Joined: Jan 23rd, 2015
Ensuring Diagram does not become too small to show all items on it
Aug 24th, 2015 at 4:20pm
Print Post  
In my previous question "Diagram which matches current window size or in ScrollPane?" the help given allowed me to change the size of the diagram to match the current window size really well.

However, if someone makes the window large and creates a diagram which fills it, then makes the window smaller, the diagram also becomes smaller so some items are 'off' the diagram.

What I need to be able to do instead is keep the diagram large enough to display all items, and instead add scroll bars as the window becomes smaller.

I assume that to do this I need to check the positions of all items on the diagram when I 're-size' it? Or is there a better way?

Any advice on the best way of doing this would be very welcome.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Ensuring Diagram does not become too small to show all items on it
Reply #1 - Aug 25th, 2015 at 8:49am
Print Post  
Do you keep the Math.max calls from original thread (http://mindfusion.eu/Forum/YaBB.pl?num=1429721487 )? They should prevent the diagram from getting smaller than whatever size it grew to after maximizing. I suppose you might have removed them to implement some kind of 'always fit' behavior. You could replace the getBounds() call with getContentBounds() if you want to match scroll range to item positions.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
AR
Junior Member
**
Offline


I Love MindFusion!

Posts: 65
Joined: Jan 23rd, 2015
Re: Ensuring Diagram does not become too small to show all items on it
Reply #2 - Aug 25th, 2015 at 5:48pm
Print Post  
Yes I had kept the Math.max() calls.

Using getContentBounds() instead of getBounds() worked just as I needed.

Thanks again for you help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint