Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Not able to pan over the complete visible area when zoomed out (Read 2056 times)
dossantos
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Mar 25th, 2013
Not able to pan over the complete visible area when zoomed out
Jul 14th, 2014 at 6:13am
Print Post  
Hi,

this is a little bit hard to explain; if it's not understandable, I'll prepare a quick screencast:

When panning using the RMB action "Pan", and if the diagram is zoomed out sufficiently (so that it fits on the view completely), it's not possible to move it to the lower-right side of the view; it stops roughly at the center of the view.

When zooming out further, the pan-able area is confined to the upper-left corner of the view (the left side of the diagram doesn't leave the left edge of the view anymore, and the same for the upper side / upper edge). I can, however, pan it outside of the view to the upper-left side.

Is this by design? I'd like to be able to pan the diagram wherever I want, always.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Not able to pan over the complete visible area when zoomed out
Reply #1 - Jul 14th, 2014 at 10:33am
Print Post  
Hi,

The scroll range depends on the size of diagram.Bounds. You could modify it dynamically when ZoomFactor changes to make sure there's enough space on all sides of diagram's content to scroll to:

Code
Select All
diagramView.RightButtonActions = MouseButtonActions.Pan;

diagramView.ZoomFactorChanged += (s, args) =>
{
	var bounds = diagram.GetContentBounds(false, false);
	var boundsPix = diagramView.DocToClient(bounds);
	var clientRect = diagramView.ClientRectangle;

	var panAreaPix = boundsPix;
	panAreaPix.Inflate(
		clientRect.Width * 2 / 3, clientRect.Height * 2 / 3);

	diagram.Bounds = diagramView.ClientToDoc(panAreaPix);
}; 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dossantos
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Mar 25th, 2013
Re: Not able to pan over the complete visible area when zoomed out
Reply #2 - Jul 15th, 2014 at 7:04am
Print Post  
Thanks, that works like a charm!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint