Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramView is missing the SetZoomFactor method (Read 2102 times)
bogdip
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 70
Joined: Sep 8th, 2008
DiagramView is missing the SetZoomFactor method
Nov 12th, 2014 at 3:14pm
Print Post  
Hi Stoyan,

We'd like to zoom the diagram by mouse wheel and take the mouse position as a pivot for the zooming. The diagram's method 'SetZoomFactor(double zoomFactor, Point pivotPoint)' suits our needs but unfortunately we can't use it as the diagram is placed inside a DiagramView so any zooming must be done on DiagramView level.
I've noticed in the last patches you've added more zoom methods in the DiagramView, but this one is still missing.

Do you have in plan to add it too or is there a workaround for this ?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView is missing the SetZoomFactor method
Reply #1 - Nov 13th, 2014 at 9:48am
Print Post  
Hi,

Now it's available for DiagramView too:
https://mindfusion.eu/_beta/wpfdiag.3.2.zip

Code
Select All
private void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
	var view = sender as DiagramView;
	if (view != null)
	{
		view.SetZoomFactor(
			view.ZoomFactor + e.Delta / 20.0,
			view.ClientToDoc(e.GetPosition(view)));
		e.Handled = true;
	}
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
bogdip
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 70
Joined: Sep 8th, 2008
Re: DiagramView is missing the SetZoomFactor method
Reply #2 - Nov 14th, 2014 at 2:34pm
Print Post  
Thanks much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint