Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Events.leaveInplaceEditMode - What are Available args Properties? (Read 1537 times)
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
Events.leaveInplaceEditMode - What are Available args Properties?
Dec 8th, 2016 at 2:36am
Print Post  
What properties are available using args after the event leaveInplaceEditMode is fired?
Will this work?     shapeNode = args.getNode();

Is code complete available? If so how do I configure it?

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


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Events.leaveInplaceEditMode - What are Available args Properties?
Reply #1 - Dec 8th, 2016 at 10:02am
Print Post  
It's an InplaceEditEventArgs object with getItem() and getControl() members. You'd use this mostly for cleanup if you've created a custom editor UI from enterInplaceEditMode handler.

If using standard text box, you could handle nodeTextEdited and linkTextEdited events, their event arguments have more specific getNode() and getLink() functions.

Add this to your script file to get code completion in Visual Studio -
Code
Select All
/// <reference path="MindFusion.Diagramming-vsdoc.js" /> 



It will work only for variables that VS can directly link to MindFusion types defined in the vsdoc.js file. E.g. you will get completion working for diagram variable if it's created through Diagram static method, but not through global functions like $find or $create (from MS Ajax) -

Code
Select All
var diagram = Diagram.create($get("diagram")); 



Once VS knows diagram variable refers to MindFusion.Diagramming.Diagram, it will infer types of other objects accessed through it -



Completion won't work in event handlers unless you add your own type annotations for the handler functions, either through <param name="..." type="..." comments as in our vsdoc file or using VS script context API -
https://msdn.microsoft.com/en-us/library/hh874692.aspx

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