Events

This section describes events this widget fires.

See Also

contentReady

Raised when the widget's content is ready.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget's instance.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only when using Knockout.

Main article: onContentReady.

See Also

dataChanged

Raised when the widget's data changes.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget instance's name.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

Main article: onDataChanged

disposing

Raised before the widget is disposed of.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget instance.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

Main article: onDisposing

See Also

initialized

Raised only once, after the widget is initialized.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget's instance.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

Main article: onInitialized

See Also

itemClick

Raised after a shape or connector is clicked.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget instance's name.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

item dxDiagramItem

The item (shape or connector) related to the event.

model

Object

Model data. Available only if you use Knockout.

Main article: onItemClick

itemDblClick

Raised after a shape or connector is double-clicked.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget instance's name.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

item dxDiagramItem

The item (shape or connector) related to the event.

model

Object

Model data. Available only if you use Knockout.

Main article: onItemClick

optionChanged

Raised after a widget option is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget's instance.

fullName

String

The path to the modified option that includes all parent options.

name

String

The modified option if it belongs to the first level. Otherwise, the first-level option it is nested into.

value any

The modified option's new value.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

Main article: onOptionChanged

See Also

selectionChanged

Raised after the selection is changed in the Diagram.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Diagram

The widget instance's name.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

items

Array<dxDiagramItem>

An array of selected items (shapes or connectors).

model

Object

Model data. Available only if you use Knockout.

Main article: onItemClick