Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Deselect nodes (Read 1979 times)
jgreen
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Aug 12th, 2010
Deselect nodes
Aug 30th, 2010 at 8:54pm
Print Post  
Using javascript, how do you deselect all selected nodes and select a node that was just right-clicked?   (same behavior as if you just left-clicked it).



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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Deselect nodes
Reply #1 - Aug 31st, 2010 at 9:17am
Print Post  
Code
Select All
var RightMouseButton = 3;

function onNodeClicked(sender, args)
{
	if (args.getMouseButton() == RightMouseButton)
	{
		var applet = <%= diagramView.AppletElement %>;
		var diagram = applet.getDiagram()
		diagram.getSelection().change(args.getNode());
		diagram.repaint();
	}
} 



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


I love YaBB 1G - SP1!

Posts: 27
Joined: Aug 12th, 2010
Re: Deselect nodes
Reply #2 - Aug 31st, 2010 at 3:28pm
Print Post  
Perfect!  thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint