Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Clear selection of nodes (Read 3182 times)
mandz
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Clear selection of nodes
May 8th, 2013 at 8:43am
Print Post  
How do I clear all selected items (nodes and links)?  I've tried this:

Code (Javascript)
Select All
diagram.Selection.Items.Clear(); 



Problem is that the Selection is always empty, even if I select a node.
  
Back to top
 
IP Logged
 
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Re: Clear selection of nodes
Reply #1 - May 8th, 2013 at 9:15am
Print Post  
Hi,

Could you please try this

   var selectedItems = diagram.getSelection();

Thanks
Kiran B
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Clear selection of nodes
Reply #2 - May 8th, 2013 at 9:33am
Print Post  
If you need to clear the selection on client side, you can access the selection object using diagram.getSelection() as Kiran noted, and then call its clear method:

diagram.getSelection().clear();

You can find the public JavaScript methods listed for each class here:
http://mindfusion.eu/onlinehelp/mvcdiagram/index.htm?CC_N_MindFusion_Diagramming...

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


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Re: Clear selection of nodes
Reply #3 - May 9th, 2013 at 12:25am
Print Post  
Thanks both for the reply.  I got it working.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint