Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram auto scrolling speed (Read 1634 times)
xan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 16th, 2008
Diagram auto scrolling speed
Sep 2nd, 2008 at 3:25pm
Print Post  
Another quick question...

Is there a built in way to control the speed at which the diagram auto-scrolls, for example when dragging a node, or the end of a link, outside the bounds of the diagram, or the bounds of the view?

The default speed is a little slow for my app but I have not found any way of speeding it up internally.

As always thanks for your help Smiley.

Cheers,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram auto scrolling speed
Reply #1 - Sep 3rd, 2008 at 6:58am
Print Post  
Hi,

Currently there is no way to control the auto-scroll speed using the public API. We'll add some property to let you do this with the next release.

Stoyan
  
Back to top
 
IP Logged
 
xan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 16th, 2008
Re: Diagram auto scrolling speed
Reply #2 - Sep 12th, 2008 at 2:59pm
Print Post  
That would be great - thankyou!

Another question related to diagram scrolling:

Is there a way to have the diagram size increase when you scroll to the edge in the same was as when you drag an element off the edge of the diagram?

I'm attempting to do this by using a ScrollChanged event handler function. This checks the current view bounds and if the view is currently at the edge of the digram, it extends it.

However, it's not working as I expected, and further more, the ScrollChanged event is (understandable) not called if the diagram is zoomed out to the point where it cannot be scrolled!

My code is similar to the below, any suggestions as to a different approach would be great.

Cheers,

xan.

Code
Select All
//snipped handler function to illustrate what I'm trying to do  :)
private void diagramView1_ScrollChanged(object sender, EventArgs e)
{
           PointF docPointTL = diagramView1.ClientToDoc(PointToClient(diagramView1.Bounds.Location));
           float docLeft = docPointTL.X;
           if (docLeft <= diagram1.Bounds.Left)
           {
                   RectangleF bounds = diagram1.Bounds;
                   bounds.X -= extend;
                   diagram1.Bounds = bounds;
           }
}
 

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram auto scrolling speed
Reply #3 - Sep 14th, 2008 at 7:27am
Print Post  
Hi,

Handle both ScrollChanged and ZoomFactorChanged events. Then you could use DiagramView.ClientToDoc(DiagramView.ClientRectangle) to find what part of the diagram is currently visible in the view. If you detect that any of the coordinates of the visible rect are near or outside of diagram.Bounds, increase the diagram size.

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