Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Multiple Item Select - Only Select Nodes (Read 966 times)
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
Multiple Item Select - Only Select Nodes
Jun 29th, 2021 at 12:49am
Print Post  
I saw this method: https://mindfusion.eu/Forum/YaBB.pl?num=1245076133/2, and I changed it work in Javascript, but the function is never called. My version below.

private void OnSelectionChanged(object sender, EventArgs e)
{
     if (!inSelChanged)
     {
           inSelChanged = true;
           while (diagram.Selection.Links.Count > 1)
                 diagram.Selection.Links[0].Selected = false;
           inSelChanged = false;
     }
}

private bool inSelChanged;


My Version:

function  onSelectionChanged(sender,args)
{
     if (!inSelChanged)
     {
           inSelChanged = true;
           while (diagram.Selection.Links.Count > 1)
                 diagram.Selection.Links[0].Selected = false;
           inSelChanged = false;
     }
}

var inSelChanged = false;

diagram.addEventListener(Events.selectionChanged, onSelectionChanged);


Javascript doesn't complain, it simply ignores the multiple item selection.  What am I missing?   Thanks






  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Multiple Item Select - Only Select Nodes
Reply #1 - Jun 29th, 2021 at 2:20pm
Print Post  
That event's not available in the JavaScript library -
https://www.mindfusion.eu/onlinehelp/jsdiagram/index.htm?T_MindFusion_Diagrammin...

If you need to prevent users from selecting links altogether, try setting links' Locked property.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint