GoDiagram Smooth Scrolling

Hi,

I see by default, in the protoApp example and other examples when you drag a GoDiagram object to the edge of the Godiagram surface that "panning" takes place, but sadly its not smooth panning
The Godiagram object tends to jump between being close to the edge and further away from the edge flip flopping too and fro...
Is it possible to implement smooth scrolling by default in GoDiagram?
Many Thanks Phil

That’s “autoscrolling”. You can try setting various GoView properties to change the behavior: AutoScrollRegion, AutoScrollTime, ScrollSmallChange.

If those customizations are insufficient to make the scrolling "smooth", you can try overriding GoView.ComputeAutoScrollDocPosition. Here's the standard definition:
public virtual PointF ComputeAutoScrollDocPosition(Point viewPnt) {
PointF docpos = this.DocPosition;
Point viewpos = ConvertDocToView(docpos);
Size margin = this.AutoScrollRegion;
int deltaX = this.ScrollSmallChange.Width;
int deltaY = this.ScrollSmallChange.Height;
Rectangle dispRect = this.DisplayRectangle;
if (viewPnt.X >= dispRect.X && viewPnt.X < dispRect.X + margin.Width) {
viewpos.X -= deltaX;
if (viewPnt.X < dispRect.X + margin.Width/2)
viewpos.X -= deltaX;
if (viewPnt.X < dispRect.X + margin.Width/4)
viewpos.X -= 4*deltaX;
} else if (viewPnt.X <= dispRect.X + dispRect.Width && viewPnt.X > dispRect.X + dispRect.Width - margin.Width) {
viewpos.X += deltaX;
if (viewPnt.X > dispRect.X + dispRect.Width - margin.Width/2)
viewpos.X += deltaX;
if (viewPnt.X > dispRect.X + dispRect.Width - margin.Width/4)
viewpos.X += 4*deltaX;
}
if (viewPnt.Y >= dispRect.Y && viewPnt.Y < dispRect.Y + margin.Height) {
viewpos.Y -= deltaY;
if (viewPnt.Y < dispRect.Y + margin.Height/2)
viewpos.Y -= deltaY;
if (viewPnt.Y < dispRect.Y + margin.Height/4)
viewpos.Y -= 4*deltaY;
} else if (viewPnt.Y <= dispRect.Y + dispRect.Height && viewPnt.Y > dispRect.Y + dispRect.Height - margin.Height) {
viewpos.Y += deltaY;
if (viewPnt.Y > dispRect.Y + dispRect.Height - margin.Height/2)
viewpos.Y += deltaY;
if (viewPnt.Y > dispRect.Y + dispRect.Height - margin.Height/4)
viewpos.Y += 4*deltaY;
}
docpos = ConvertViewToDoc(viewpos);
return docpos;
}

You'll note that it intentionally increases the scrolling distance the closer the mouse is to the edge of the DisplayRectangle. Perhaps you don't want it to do that -- in particular the "... += 4*delta..." statements. That certainly contributes to the "jumpiness" of the scrolling, in addition to the default value for ScrollSmallChange.

thanks i will try that out