Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic diagram.resizeToFitItems does not consider lanes (Read 2747 times)
Al
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Sep 3rd, 2014
diagram.resizeToFitItems does not consider lanes
Sep 8th, 2014 at 2:41pm
Print Post  
Hi, not sure if this is by design or if it's a bug but when I call diagram.resizeToFitItems (); my lane row headers get truncated if I don't use a big enough 'margin' value.
ie. resizeToFitItems does not consider a lane as an item.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: diagram.resizeToFitItems does not consider lanes
Reply #1 - Sep 9th, 2014 at 7:01am
Print Post  
Try resizing like this:

Code
Select All
var gridBounds = diagram.getLaneGrid().getColumnHeaderBounds();
gridBounds = gridBounds.union(diagram.getLaneGrid().getRowHeaderBounds());

var itemsBounds = diagram.getContentBounds();
diagram.setBounds(gridBounds.union(itemsBounds)); 



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


I Love MindFusion!

Posts: 56
Joined: Sep 3rd, 2014
Re: diagram.resizeToFitItems does not consider lanes
Reply #2 - Sep 9th, 2014 at 1:37pm
Print Post  
That worked just fine, thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint