Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Zoom in focus & Active item for multi-node selection (Read 1802 times)
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Zoom in focus & Active item for multi-node selection
May 8th, 2013 at 2:06pm
Print Post  
Hi Stoyan,

I noticed that when you zoom in the diagram, it always use the top-left corner as zooming focus. Is there any way to change that to center of diagram? Like google map is doing.

And another question about active item for selection of multiple nodes. Any way to stick the active item to the first selected node(currently the active one is the last selected). I know this looks some irregular - but users get used to our previous version which was developed with other diagram component. If there's any easy way, please let me know. Thanks.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom in focus & Active item for multi-node selection
Reply #1 - May 8th, 2013 at 4:31pm
Print Post  
Hi,

The MouseWheel handler here shows how to zoom with a specific point remaining in place:
http://mindfusion.eu/Forum/YaBB.pl?num=1225423028/2#2

To keep the oldest item the active one, try handling NodeActivated and LinkActivated like this:

Code
Select All
private void diagram_NodeActivated(object sender, NodeEventArgs e)
{
	if (e.Node != diagram.Selection.Items[0])
		diagram.ActiveItem = diagram.Selection.Items[0];
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Zoom in focus & Active item for multi-node selection
Reply #2 - May 8th, 2013 at 8:31pm
Print Post  
It works just as I want! Stoyan, thank you very much! I know you have a magic wand!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint