Search
InitializeLink Event

Raised when the user starts drawing a new link, just after the DiagramLink instance is created.

Syntax

JavaScript  Copy Code

function onInitializeLink (sender, args)

Event Data

InitializeLink handlers receive an event object of type LinkEventArgs.

Remarks

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.

See Also

Diagram Members
Diagram Class
MindFusion.Diagramming Namespace
LinkCreated Event
ActionRedone Event
LinkCreating Event