Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable inline edit for a node (Read 2295 times)
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Disable inline edit for a node
May 8th, 2013 at 1:02pm
Print Post  
Hi,

How to disable inline edit for a shape based on some logic.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable inline edit for a node
Reply #1 - May 8th, 2013 at 1:54pm
Print Post  
Hi,

You could set DiagramView.AllowInplaceEdit to false to prevent it for all nodes, and with this version of the script call diagram.beginEdit(args.getNode()) from a nodeDoubleClicked event handler:

http://mindfusion.eu/Forum/YaBB.pl?num=1367424264

With that version you will also no longer need the ContainerNode replacements for resizeToFit, startDrag and cancelDrag.

Alternatively, you could replace the Diagram.beginEdit(item,point) function with your own version that simply returns for some nodes.

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


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Re: Disable inline edit for a node
Reply #2 - May 9th, 2013 at 12:52am
Print Post  
Thanks, this helped me too.  I used for Javascript:

Code (Javascript)
Select All
diagram.setAllowInplaceEdit(true); 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint