addDiagramListener method

Diagram addDiagramListener(
  1. DiagramEventName name,
  2. void listener(
    1. DiagramEvent
    )
)

Register an event handler that is called when there is a DiagramEvent of a given name.

See the DiagramEvent documentation for a complete listing of diagram event names and their purposes. @param {string} name the name is normally capitalized, but this method uses case-insensitive comparison. @param {function(DiagramEvent)} listener a function that takes a DiagramEvent as its argument. @return {Diagram} this Diagram @see #removeDiagramListener

Implementation

_i3.Diagram addDiagramListener(
  _i3.DiagramEventName name,
  void Function(_i3.DiagramEvent) listener,
) =>
    _i4.callMethod(
      this,
      'addDiagramListener',
      [
        name.name,
        _i4.allowInterop(listener),
      ],
    );