Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Centre view on a node / box (Read 1901 times)
tronied
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: May 7th, 2008
Centre view on a node / box
Mar 16th, 2009 at 11:53am
Print Post  
Is it possible to centre the FlowChart's view on a node / box? I have tried a couple of things like oFlowChart.setScrollX() and setScrollY() and then using the boxes X and Y values from the bounds (cast to a float), but it never seems to put it in the middle... or even on screen at all sometimes.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Centre view on a node / box
Reply #1 - Mar 16th, 2009 at 12:09pm
Print Post  
The bringIntoView method should center the view on the item, as long as the item is not already visible before calling the method. You might try scrolling to the bottom-right of the diagram to make sure no items are visible, and call bringIntoView after that.
  
Back to top
 
IP Logged
 
tronied
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: May 7th, 2008
Re: Centre view on a node / box
Reply #2 - Mar 16th, 2009 at 2:59pm
Print Post  
That was  exactly what I was wanting. Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint