CommandHandler$Typings extension
Properties
- archetypeGroupData ↔ Object
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets a data object that is copied by #groupSelection when creating a new Group.getter/setter pair - copiesConnectedLinks ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #copySelection should also copy Links that connect with selected Nodes. The default value is true. Setting this property does not raise any events.getter/setter pair - copiesGroupKey ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #copySelection and #copyToClipboard copy the node data property whose value is the containing group data's key.getter/setter pair - copiesParentKey ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #copySelection and #copyToClipboard copy the node data property whose value is the tree-parent node data's key.getter/setter pair - copiesTree ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #copySelection should also copy subtrees. The default value is false. Setting this property does not raise any events.getter/setter pair - defaultScale ↔ num
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
(undocumented) Deprecated in favor of Diagram#defaultScale.getter/setter pair - deletesConnectedLinks ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #deleteSelection should also delete links that are connected to nodes that are deleted. The default value is true. Setting this property does not raise any events.getter/setter pair - deletesTree ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether #deleteSelection should also delete subtrees. The default value is false. Setting this property does not raise any events.getter/setter pair - diagram ↔ Diagram
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
This read-only property returns the Diagram that is using this CommandHandler, after Diagram#commandHandler has been set to this object.getter/setter pair - isZoomToFitRestoreEnabled ↔ bool
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets whether the #zoomToFit command ever restores the previous Diagram scale and position. When this property is false, this command always calls Diagram#zoomToFit.getter/setter pair - memberValidation ↔ bool Function(Group, Part)?
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets the predicate that determines whether or not a node may become a member of a group. This predicate is called in addition to any existing group's Group#memberValidation predicate. The default predicate is null, which is equivalent to simply returning true. The predicate may be called passing null as the first argument (the Group) -- this asks whether it is OK to make the second argument (the Part, but not a Link) a top-level Part of the diagram.getter/setter pair - zoomFactor ↔ num
-
Available on CommandHandler, provided by the CommandHandler$Typings extension
Gets or sets the amount by which #decreaseZoom and #increaseZoom change the Diagram#scale.getter/setter pair
Methods
-
addTopLevelParts(
Iterable< Part> coll, [bool? check]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
Make sure all of the unnested Parts in the given collection are removed from any containing Groups. -
canCollapseSubGraph(
[Group? group]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether the user can collapse expanded Groups. -
canCollapseTree(
[Node? node]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether the user can collapse expanded subtrees of Nodes. -
canCopySelection(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #copySelection command. -
canCutSelection(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #cutSelection command. -
canDecreaseZoom(
[num? factor]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #decreaseZoom command. -
canDeleteSelection(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #deleteSelection command. -
canEditTextBlock(
[TextBlock? textblock]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #editTextBlock command. -
canExpandSubGraph(
[Group? group]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether the user can expand collapsed Groups. -
canExpandTree(
[Node? node]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether the user can expand collapsed subtrees of Nodes. -
canGroupSelection(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #groupSelection command. -
canIncreaseZoom(
[num? factor]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #increaseZoom command. -
canPasteSelection(
[Point? pos]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #pasteSelection command. -
canRedo(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #redo command. -
canResetZoom(
[num? newscale]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #resetZoom command. -
canScrollToPart(
[Part? part]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #scrollToPart command. This returns false if there is no argument Part and there are no selected Parts. -
canSelectAll(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #selectAll command. -
canShowContextMenu(
[Object? obj]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #showContextMenu command. -
canStopCommand(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether the user may stop the current tool. This just returns true. -
canUndo(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #undo command. -
canUngroupSelection(
[Group? group]) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #ungroupSelection command. -
canZoomToFit(
) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate controls whether or not the user can invoke the #zoomToFit command. -
collapseSubGraph(
[Group? group]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command collapses all expanded selected Groups. This operation is performed within a "Collapse SubGraph" transaction. Just before the end of the transaction this raises the "SubGraphCollapsed" DiagramEvent, with a collection of collapsed Groups as the subject. This currently has no default keyboard shortcut. -
collapseTree(
[Node? node]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command collapses all expanded selected Nodes. This operation is performed within a "Collapse Tree" transaction. Just before the end of the transaction this raises the "TreeCollapsed" DiagramEvent, with a collection of collapsed Nodes as the subject. This currently has no default keyboard shortcut. -
computeEffectiveCollection(
Iterable< Part> parts, [DraggingOptions? options]) → Map<Part, DraggingInfo> -
Available on CommandHandler, provided by the CommandHandler$Typings extension
Find the actual collection of nodes and links to be moved or copied, given an initial collection. This includes links that connected at both ends to nodes being moved or copied, members of Groups, and if DraggingTool#dragsTree is true, this includes nodes and links that are "tree" descendants from selected nodes. -
copySelection(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command copies the currently selected parts, Diagram#selection, from the Diagram into the clipboard. This is normally invoked by theCtrl-C
keyboard shortcut. -
copyToClipboard(
[Iterable< Part> ? coll]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
Make a copy of the given collection of Parts and stores it in a static variable acting as the clipboard. -
cutSelection(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command executes a #copySelection followed by a #deleteSelection. This is normally invoked by theCtrl-X
keyboard shortcut. -
decreaseZoom(
[num? factor]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command decreases the Diagram#scale by a given factor. This is normally invoked by theCtrl--
andKeypad--
keyboard shortcuts. -
deleteSelection(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command deletes the currently selected parts from the diagram. This is normally invoked by theDel
keyboard shortcut. -
doKeyDown(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This is called by tools to handle keyboard commands. For most commands, this calls the "can..." predicate; if that returns true it calls the command method. If GoJS handles a key-down event as a keyboard command, the underlying event will not bubble. -
doKeyUp(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This is called by tools to handle keyboard commands. -
editTextBlock(
[TextBlock? textblock]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command starts in-place editing of a TextBlock in the selected Part. This is normally invoked by theF2
keyboard shortcut. -
expandSubGraph(
[Group? group]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command expands all collapsed selected Groups. This operation is performed within an "Expand SubGraph" transaction. Just before the end of the transaction this raises the "SubGraphExpanded" DiagramEvent, with a collection of expanded Groups as the subject. This currently has no default keyboard shortcut. -
expandTree(
[Node? node]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command expands all collapsed selected Nodes. This operation is performed within an "Expand Tree" transaction. Just before the end of the transaction this raises the "TreeExpanded" DiagramEvent, with a collection of expanded Nodes as the subject. This currently has no default keyboard shortcut. -
groupSelection(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command adds a copy of #archetypeGroupData to the diagram's model to create a new Group and then adds the selected Parts to that new group. This is normally invoked by theCtrl-G
keyboard shortcut. -
increaseZoom(
[num? factor]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command increases the Diagram#scale by a given factor. This is normally invoked by theCtrl-+
andKeypad-+
keyboard shortcuts. -
isValidMember(
Group group, Part part) → bool -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This predicate is called to determine whether a Node may be added as a member of a Group. This always checks to make sure no group might become a member of itself, either directly or indirectly. If the Group has a Group#memberValidation predicate and if it returns false, this method returns false. If this CommandHandler has a #memberValidation predicate and if it returns false, this method returns false. Otherwise this will return true. -
pasteFromClipboard(
) → Set< Part> -
Available on CommandHandler, provided by the CommandHandler$Typings extension
If the clipboard holds a collection of Parts, and if the Model#dataFormat matches that stored in the clipboard, this makes a copy of the clipboard's parts and adds the copies to this Diagram. -
pasteSelection(
[Point? pos]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command copies the contents of the clipboard into this diagram and makes those new parts the new selection. This is normally invoked by theCtrl-V
keyboard shortcut. -
redo(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command calls UndoManager#redo. This is normally invoked by theCtrl-Y
keyboard shortcut. -
resetZoom(
[num? newscale]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command sets the Diagram#scale to a new scale value, by default 1. This is normally invoked by theCtrl-0
keyboard shortcut. -
scrollToPart(
[Part? part]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command scrolls the diagram to make a highlighted or selected Part visible in the viewport. Call this command repeatedly to cycle through the Diagram#highlighteds collection, if there are any Parts in that collection, or else in the Diagram#selection collection, scrolling to each one in turn by calling Diagram#centerRect. -
selectAll(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command selects all of the selectable Parts in the diagram by setting Part#isSelected to true on each one. This is normally invoked by theCtrl-A
keyboard shortcut. -
showContextMenu(
[Object? obj]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command opens the context menu for a selected Part or given GraphObject, or else for the whole Diagram. This is normally invoked by theMenu
keyboard shortcut. -
stopCommand(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command cancels the operation of the current tool. This is typically called when the user presses ESCAPE. -
undo(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command calls UndoManager#undo. This is normally invoked by theCtrl-Z
keyboard shortcut. -
ungroupSelection(
[Group? group]) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command removes selected groups from the diagram without removing their members from the diagram. This is normally invoked by theCtrl-Shift-G
keyboard shortcut. -
zoomToFit(
) → void -
Available on CommandHandler, provided by the CommandHandler$Typings extension
This command changes the Diagram#scale so that the Diagram#documentBounds fits within the viewport. If this command had been called before without any other zooming since then, the original Diagram scale and position are restored. This is normally invoked by theShift-Z
keyboard shortcut. If you do not want the behavior where this command might restore the original diagram scale and position on a subsequent call, set #isZoomToFitRestoreEnabled to false.