Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Overview control with diagram occupying the entire space. (Read 2868 times)
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Overview control with diagram occupying the entire space.
Oct 24th, 2013 at 5:02pm
Print Post  
Hi,

I need overview control with a small change.
Right now overview is displaying the diagram in a reduced size.

But I need overview in such a way that, if there is only one node, that node has to occupy the entire overview control. In short the overview has to show the diagram occupying the entire overview.

I don't need the navigation feature in overview.

Can I achieve this?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overview control with diagram occupying the entire space.
Reply #1 - Oct 25th, 2013 at 10:52am
Print Post  
Hi,

The overview control fits the entire rectangle returned by Diagram.getBounds(). So at this time you can achieve that only by setting a smaller diagram.Bounds that exactly fits the diagram's content.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Re: Overview control with diagram occupying the entire space.
Reply #2 - Oct 25th, 2013 at 2:34pm
Print Post  
Hi Stoyan,

Could you please let me know which is the method in Overview is calling Diagram.getBounds(), so that i can override and achieve the functionality i needed.

Also if there any way to get the Diagram bounds which is covering the shapes alone? ie the co-ordinates of the smallest rectangle which covers all the shapes in the diagram.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Overview control with diagram occupying the entire space.
Reply #3 - Oct 28th, 2013 at 11:49am
Print Post  
I can't see any easy way to override this right now; we'll try to add some options for how the diagram content fits within the Overview for next release.

If you have the source code you could check the init() function in Overview.js and replace it with a custom method, but it uses the width and height of the diagram canvas element already calculated from Bounds, MeasureUnit and current zoom level of the diagram object.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint