showContextMenu method

void showContextMenu([
  1. Object? obj
])

This command opens the context menu for a selected Part or given GraphObject, or else for the whole Diagram. This is normally invoked by the Menu keyboard shortcut.

The given GraphObject must have a GraphObject#contextMenu defined in order to show anything.

This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {GraphObject|Diagram=} obj a GraphObject or Diagram with a contextMenu defined. If none is given, this method will use the first selected object, or else the Diagram. The method will simulate a right-button click at the middle of the GraphObject or, if a Diagram, at the current mouse position if it is in the viewport. @see #canShowContextMenu

Implementation

void showContextMenu([_i2.Object? obj]) {
  _i4.callMethod(
    this,
    'showContextMenu',
    [obj ?? _i5.undefined],
  );
}