Search
InitializeNode Event

Raised when the user starts drawing a new node, just after the DiagramNode instance is created.

Syntax

JavaScript  Copy Code

function onInitializeNode (sender, args)

Event Data

InitializeNode handlers receive an event object of type NodeEventArgs.

Remarks

This event is raised immediately after the user starts drawing a new node. It lets you set the appearance properties of the node 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 InitializeNode event, assign the name of the respective JavaScript function (for example 'onInitializeNode') to the InitializeNodeScript property.

See Also

Diagram Members
Diagram Class
MindFusion.Diagramming Namespace
NodeCreated Event
ActionRedone Event
NodeCreating Event