E
The Commands class exposes a standard set of IGraph-related editing and navigation constants.

Remarks

IInputModes of the GraphComponent provide implementations for these commands. The commands can be executed with CanvasComponent's executeCommand method if the canExecuteCommand method returns true.

See Also

Developer's Guide

API

GraphEditorInputMode, GraphViewerInputMode, NavigationInputMode

Members

No filters for this type

Constants

If the parameter to this command is an ILabelOwner instance, then we will use that item. If the parameter is null and there is exactly one selected ILabelOwner, then we will use the selected item.

The default shortcut for this command is Shift+F2.

static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand

If the parameter to this command is null, the sizes of the currently selected group nodes are adjusted. If the parameter is an INode instance, the size of that group node will be adjusted. If the parameter is an IEnumerable<T> instance, then the sizes of all group nodes in that enumeration are adjusted.

The default shortcut for this command is Ctrl-Shift-G.

static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand
Starts edge creation via installed CreateEdgeInputMode instances.
If this command gets executed, the parameter is inspected to see if it is set to either an IPortCandidate, an IPort, or an INode that is an element in the currently edited graph instance. If so, the method startEdgeCreation will be invoked and the user can finish the edge creation gesture.
static

See Also

Developer's Guide
Collapses the group node specified by the parameter.

If the parameter to this command is null, the currently selected group nodes are collapsed. If the parameter is an INode instance, that group node will be collapsed. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are collapsed.

The default shortcut for this command is Alt+Left.

static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand, TOGGLE_EXPANSION_STATE
Gets the copy command.

Copies the selected graph elements into the clipboard using copy.

The default shortcut for this command is Ctrl+C.

static

See Also

Developer's Guide
Gets the cut command.

Copies the selected graph elements into the clipboard and removes them using cut.

The default shortcut for this command is Ctrl+X.

static

See Also

Developer's Guide
Decrease zoom.
The default shortcut for this command is Ctrl+OemMinus.
static

See Also

Developer's Guide
Gets the delete command.

Deletes the selected graph items as in the method deleteSelection.

The default shortcut for this command is the Delete key.

static

See Also

Developer's Guide
Clears the selection.
The default shortcut for this command is Ctrl+Shift+A.
static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand
Deselects an item.
If the parameter to this command is an IModelItem instance, then that item will be deselected. Otherwise, if there is a current item, it will be deselected.
static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand
Duplicate items of the current IGraph.
The default shortcut for this command is Ctrl+D.
static

See Also

Developer's Guide

We first determine the item to edit: If the parameter to this command is an IModelItem instance, then we will use that item. If the parameter is null and there is exactly one selected item, then we will use the selected item.

Then we determine the label to edit from the given item: If the item is an ILabel instance, then that label will be edited. If the item is an ILabelOwner instance with an editable label, then that label will be edited. If the item is an ILabelOwner instance with no editable label, then a new label will be added and edited.

The default shortcut for this command is F2.

static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand
Switches the local root of the current IFoldingView view to the given group node.

If the parameter to this command is null, the currently selected group node is entered. If the parameter is an INode instance that is a group node, that group node will be entered.

The default shortcut for this command is Alt+Down.

static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand
Exits the current local root of the current IFoldingView view to the given parent view.
The default shortcut for this command is Alt+Up.
static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand
Expand the group node specified by the parameter.

If the parameter to this command is null, the currently selected group nodes are expanded. If the parameter is an INode instance, that node will be expanded. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are expanded.

The default shortcut for this command is Alt+Right.

static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand, TOGGLE_EXPANSION_STATE
Extend selection down command.

Extends the selection downwards.

The default shortcut for this command is Shift+Down.

static

See Also

Developer's Guide
Extend the selection one level down in the hierarchy.

Extends the selection one level down in the hierarchy. This typically adds a child of the currently focused group node to the selection.

The default shortcut for this command is Ctrl+Shift+PageDown.

static

See Also

Developer's Guide
Extend the selection to an element higher up in the hierarchy.

Extends the selection one level up in the hierarchy. This typically extends the selection to a child of the currently selected element.

The default shortcut for this command is Ctrl+Shift+PageUp.

static

See Also

Developer's Guide
Extend selection left command.

Extends the selection to the left.

The default shortcut for this command is Shift+Left.

static

See Also

Developer's Guide
Extend selection right command.

Extends the selection to the right.

The default shortcut for this command is Shift+Right.

static

See Also

Developer's Guide
Extend selection up command.

Extends the selection upwards.

The default shortcut for this command is Shift+Up.

static

See Also

Developer's Guide
Invokes fitContent when executed.
static

See Also

Developer's Guide

The parameter can be either an Insets or convertible that will be used to create an appropriately sized Insets object from.

This command considers margins defined by contentMargins. The margins define the visible whitespace around the actual contentBounds.

The default shortcut for this command is Alt+1

static

See Also

Developer's Guide
The default shortcut for this command is Ctrl+G.
static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand
Increase zoom.
The default shortcut for this command is Ctrl+OemPlus.
static

See Also

Developer's Guide
Lowers the visual representations of IModelItems one step back.

Lowers the main render tree element of IModelItems in their parent group one step back.

GraphEditorInputMode can execute this command if it is installed in a GraphComponent and. As parameter, the following values are accepted:

static

See Also

Developer's Guide
API
lower, lowerSelection
Gets the move down command.

Moves the selection down.

The default shortcut for this command is the Down cursor key.

static
Move focus down command.

Moves the focus down.

The default shortcut for this command is Ctrl+Down.

static
Move focus one level down in the hierarchy command.

Moves the focus downwards in the hierarchy. This is used for moving the focus from a group node to its children.

The default shortcut for this command is Ctrl+PageDown.

static
Move focus up in the hierarchy command.

Moves the focus upwards in the hierarchy. This is used for moving the focus from a node to its containing group node.

The default shortcut for this command is Ctrl+PageUp.

static
Move focus left command.

Moves the focus left.

The default shortcut for this command is Ctrl+Left.

static
Move focus right command.

Moves the focus right.

The default shortcut for this command is Ctrl+Right.

static
Move focus up command.

Moves the focus up.

The default shortcut for this command is Ctrl+Up.

static
Selection one hierarchy level down command.

Moves the focus downwards in the hierarchy. This is used for moving the focus from a group node to its children.

There default shortcut is Alt+PageDown.

static
Move selection one hierarchy level up command.

Moves the selection one hierarchy level upwards.

The default shortcut for this command is Alt+PageUp.

static
Gets the move left command.

Moves the selection left.

The default shortcut for this command is the Left cursor.

static
Gets the move right command.

Moves the selection right.

The default shortcut for this command is the Right cursor key.

static
Gets the move up command.

Moves the selection up.

The default shortcut for this command is the Up cursor key.

static
Gets the paste command.

Copies the graph elements from the clipboard into the current graph using paste.

The default shortcut for this command is Ctrl+V.

static

See Also

Developer's Guide
Gets the print command.

If supported, a print operation will be initiated.

The default shortcut for this command is Ctrl+P.

static
Gets the print preview command.
If supported, a print preview dialog will be opened.
static
Raises the visual representations of IModelItems one step to the front.

Raises the main render tree element of IModelItems in their parent group one step to the front.

GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As parameter the following values are accepted:

static

See Also

Developer's Guide
API
raise, raiseSelection
Gets the redo command.

Redoes the last undone operation using redo.

The default shortcut for this command is Ctrl+Y.

static

See Also

Developer's Guide
Reverses the direction of edges.

GraphEditorInputMode can execute this command if it is installed in a GraphComponent. The parameter specifies the edges to be reversed and can be an IEdge, an IEnumerable<IEdge> or null. If the parameter is null the currently selected edges will be reversed.

The default shortcut for this command is Ctrl+R.

static

See Also

Developer's Guide
API
reverseEdges
Scroll page down.

Scrolls the CanvasComponent one page down.

The default shortcut for this command is PageDown.

static

See Also

Developer's Guide
Scroll page left.

Scrolls the CanvasComponent one page left.

The default shortcut for this command is Shift+PageUp.

static

See Also

Developer's Guide
Scroll page right.

Scrolls the CanvasComponent one page right.

The default shortcut for this command is Shift+PageDown.

static

See Also

Developer's Guide
Scroll page up.

Scrolls the CanvasComponent one page up.

The default shortcut for this command is PageUp.

static

See Also

Developer's Guide
Gets the "select all" command.

Selects all graph elements as supported by selectAll.

The default shortcut for this command is Ctrl+A.

static

See Also

Developer's Guide
Selects an item.
If the parameter to this command is an IModelItem instance, then that item will be selected. Otherwise, if there is a current item, it will be selected.
static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand
Sets the currentItem when executed.
static

See Also

Developer's Guide
Brings the visual representations of IModelItems to the back.

Brings the main render tree element of IModelItems in their parent group to the back.

GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As parameter, the following values are accepted:

static

See Also

Developer's Guide
API
toBack, selectionToBack
Brings the visual representations of IModelItems to the front.

Brings the main render tree element of IModelItems in their parent group to the front.

GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As parameter the following values are accepted:

static

See Also

Developer's Guide
API
toFront, selectionToFront
Toggles the collapsed/expanded state of the currently selected group nodes.

If the parameter to this command is null, the currently selected group nodes are toggled. If the parameter is an INode instance, that group node will be toggled. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are toggled.

The default shortcuts for this command are Alt+Shift+Left and Alt+Shift+Right.

static

See Also

Developer's Guide
API
addCommandBinding, canExecuteCommand, executeCommand
Toggles the selection state of an item.

If the parameter to this command is an IModelItem instance, then the selection state of that item will be toggled. Otherwise, if there is a current item, its selection state will be toggled.

The default shortcut for this command is Ctrl+Space.

static

See Also

Developer's Guide
API
addCommandBinding
Gets the undo command.

Undoes the last operation using undo.

The default shortcut for this command is Ctrl+Z.

static

See Also

Developer's Guide
The default shortcut for this command is Ctrl+U.
static

See Also

API
addCommandBinding, canExecuteCommand, executeCommand
Invokes updateContentBounds when executed.
static

See Also

Developer's Guide
Zoom.
The default shortcuts for this command are Ctrl+0 and Alt+0, which zoom to a zoom value of 1.
static

See Also

Developer's Guide
Sets the zoom and the viewPoint in an animated fashion such that the currentItem becomes fully visible.

This command considers margins defined by contentMargins. The margins define the visible whitespace around the rectangle in which the respective item is centered. This way it is also possible to get asymmetric whitespace around the item.

If a viewportLimiter is enabled, its bounds are respected such that it may also happen that the item is not fully visible.

static

See Also

Developer's Guide
Sets the zoom and the viewPoint in an animated fashion such that all items in the selection become fully visible.

This command considers margins defined by contentMargins. The margins define the visible whitespace around the rectangle in which the respective items are centered. This way it is also possible to get asymmetric whitespace around the items.

If a viewportLimiter is enabled, its bounds are respected such that it may also happen that the items are not fully visible.

The default shortcut for this command is Alt+2

static

See Also

Developer's Guide

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: Command
The value to convert to an enum constant.

Return Value

Command
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: Command
The numeric value of an enum constant.

Return Value

string
The name of the enum constant.

Throws

Exception ({ name: 'Error' })
If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.