Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to differentiat drag and node click (Read 2107 times)
reshma
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 38
Joined: Jan 16th, 2018
How to differentiat drag and node click
Jan 17th, 2018 at 12:52pm
Print Post  
I am stuck on how can we drag and node click at a time in mindfusion is there any other event or provision to differentiat that both event?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2255
Joined: Oct 19th, 2005
Re: How to differentiat drag and node click
Reply #1 - Jan 17th, 2018 at 1:45pm
Print Post  
There are nodeModified and nodeClicked events raised respectively when you move a node or click it. If you are asking for a way to drag a node without having to click-select it first, you can enable that by setting Diagram.setModificationStart(ModificationStart.AutoHandles);
  
Back to top
 
IP Logged
 
reshma
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 38
Joined: Jan 16th, 2018
Re: How to differentiat drag and node click
Reply #2 - Jan 19th, 2018 at 8:52am
Print Post  
not worked for me
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2255
Joined: Oct 19th, 2005
Re: How to differentiat drag and node click
Reply #3 - Jan 19th, 2018 at 3:43pm
Print Post  
What's not working exactly, the control's not calling your event handler functions?
  
Back to top
 
IP Logged
 
reshma
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 38
Joined: Jan 16th, 2018
Re: How to differentiat drag and node click
Reply #4 - Jan 22nd, 2018 at 6:46am
Print Post  
yes control not calling double click event
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2255
Joined: Oct 19th, 2005
Re: How to differentiat drag and node click
Reply #5 - Jan 22nd, 2018 at 7:31am
Print Post  
The event is raised as expected for me. Have you subscribed to it by calling addEventListener?

Code
Select All
var Events = MindFusion.Diagramming.Events;
diagram.addEventListener(Events.nodeDoubleClicked, onNodeDoubleClicked); 



What kind of nodes are you using in the diagram?

Regards,
Slavcho
  
Back to top
 
IP Logged
 
reshma
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 38
Joined: Jan 16th, 2018
Re: How to differentiat drag and node click
Reply #6 - Jan 24th, 2018 at 11:06am
Print Post  
i have added event listener in same way,
var Events = MindFusion.Diagramming.Events;
diagram.addEventListener(Events.nodeDoubleClicked, onNodeDoubleClicked);
still it is not working in angular 2
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 2255
Joined: Oct 19th, 2005
Re: How to differentiat drag and node click
Reply #7 - Jan 24th, 2018 at 11:37am
Print Post  
Are you on same team as Shafi? I remember that particular Angular 2 application was calling diagram.setEnabled(false) at some point, which disables all mouse processing including handling of double clicks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint