Raised when the user starts drawing a new link, just after the DiagramLink instance is created.
JavaScript Copy Code |
---|
function onInitializeLink (sender, args) |
InitializeLink handlers receive an event object of type LinkEventArgs.
This event is raised immediately after the user starts drawing a new link. It lets you set the appearance properties of the link if you need their values to be different from the default ones defined in the Diagram object, or if they don't have correspondent properties in the Diagram class. The Initialize* events are intended only for initializing the appearance of items. Do not alter the structure of the diagram from their handlers, that is, do not create new items nor delete existing ones; if you do that, the control will be in an undefined state and will likely throw an exception at some point.
To handle the InitializeLink event, assign the name of the respective JavaScript function (for example 'onInitializeLink') to the InitializeLinkScript property.