Internal common-canvas actions¶
Internal actions can be generated by the user either:
- Clicking a toolbar button or
- Clicking an option in a context menu or context toobar or
- Pressing a keyboard shortcut key(s) or
- Doing some direct manipulation like dragging one or more objects
Some actions can be generated from different sources. For example, the deleteSelectedObjects
action can be generated by the user:
- Clicking the trash can icon in the toolbar or
- Pressing the Delete key or
- Clicking the Delete option in a context menu.
In each case, the action generates calls to the beforeEditActionHandler callback and then the editActionHandler callback. For each callback, the editType
field of the first parameter will be set to one of the actions listed below.
These are the intenal actions:
Action Name | Notes |
---|---|
Nodes | |
createNode | Create a new node on the canvas at a location identifed by the user |
createNodeOnLink | Creates a new node and inserts it into a link the palette node was dropped on |
createNodeAttachLinks | Creates a new node and attaches it to the detached link the palette node was dropped on |
createAutoNode | Creates a node at an appropriate position and, if possible, make a connection to an adjacent node |
insertNodeIntoLink | Inserts a node from the canvas into the link it was dropped on |
attachNodeToLinks | Attaches a node to one or more detached links it was dropped on |
setNodeLabel | Sets the node label |
setNodeLabelEditingMode | Puts a node label into eiting mode |
disconnectNode | Removes all links to the selected node |
Supernodes | |
createSuperNode | Creates an internal supernode |
createSuperNodeExternal | Creates an external supernode |
deconstructSuperNode | Removes a supernode and puts its contents into the canvas in its place |
expandSuperNodeInPlace | Expands a supernode to view the sub-flow in-place |
collapseSuperNodeInPlace | Collapses an in-place supernode to a regular node size |
convertSuperNodeExternalToLocal | Converts an external supernode to an internal one |
convertSuperNodeLocalToExternal | Converts an internal supernode to an external one |
displaySubPipeline | Displays a sub-flow in full-page mode so it fills the viewport |
displayPreviousPipeline | Displays the parent flow from the one currently being viewed |
loadPipelineFlow | Loads a pipeline from an external source |
Comments | |
createComment | Creates a new comment on the canvas at a location identifed by the user |
createAutoComment | Creates a node at an appropriate position on the canvas |
commentsToggle | Toggles the comments between hide and show |
commentsHide | Hides all comments on the canvas |
commentsShow | Shows all comments on the canvas |
setCommentEditingMode | Puts a comment into eiting mode |
Canvas Objects | |
moveObjects | Moves one or more selected objects to a new position on the canvas |
resizeObjects | Resizes a node or comment |
setObjectsStyle | Sets the style property of one or more nodes/comments |
colorSelectedObjects | Colors the background of the selected objects |
deleteSelectedObjects | Deletes the selected objects |
selectAll | Selects all canvas objects |
Links | |
updateLink | Updates the link info for detached links |
editComment | Changes the comment text, position and dimension info |
linkNodes | Creates a link between two nodes |
linkNodesAndReplace | Creates a link between two nodes and relaces any exiting link to the target node |
linkComment | Creates a link from a comment to a node |
createDetachedLink | Create a link from a node to a point on the canvas |
setLinksStyle | Sets the style property of one or more links |
deleteLink | Deletes a link |
Decorations | |
editDecorationLabel | Puts a label decoration into edit mode |
Arrange nodes | |
arrangeHorizontally | Arranges the nodes across the page from left to right |
arrangeVertically | Arranges the nodes down the page from top to bottom |
Palette | |
paletteToggle | Toggles the palette between opened and closed |
paletteOpen | Opens the palette (left flyout) |
paletteClose | Closes the palette (left flyout) |
saveToPalette | Saves the selected object into the palette |
Notifications | |
toggleNotificationPanel | Toggles the notification panel between opened and closed |
openNotificationPanel | Opens the notification panel |
closeNotificationPanel | Closes the notification panel |
Clipboard | |
cut | Cuts the selected canvas objects onto the clipboard |
copy | Copies the selected canvas objects onto the clipboard |
paste | Pates the contents of the clipboard onto the canvas |
Command Stack | |
undo | Undoes the previous command on the command stack |
redo | Redoes the next comment on the command stack |
Highlighting | |
highlightBranch | Highlights all upstream and downstream nodes from the one selected |
highlightDownstream | Highlights all upstream and downstream nodes from the one selected |
highlightUpstream | Highlights all upstream and downstream nodes from the one selected |
unhighlight | Unhighlights all previously highlighted nodes |
Zoom | |
zoomIn | Zooms the canvas in by one step |
zoomOut | Zooms the canvas out by one step |
zoomToFit | Zooms so all the canvas objects are visible in the viewport |
setZoom | Sets the zoom based on the enableSaveZoom config setting |
Action names with built in icons¶
If you use any of the following action names, Common Canvas will automatically display an appropriate Carbon icon for that action either if it appears as a button in the toolbar or if it appears in the overflow menu.
Action | Carbon Icon |
---|---|
stop | StopFilledAlt |
run | Play |
undo | Undo |
redo | Redo |
cut | Cut |
copy | Copy |
paste | Paste |
clipboard | Result |
createComment | AddComment |
createAutoComment | AddComment |
setCommentEditingMode | Edit |
setNodeLabelEditingMode | Edit |
commentsShow | Chat |
commentsHide | ChatOff |
colorBackground | ColorPalette |
deleteLink | TrashCan |
deleteSelectedObjects | TrashCan |
zoomIn | ZoomIn |
zoomOut | ZoomOut |
zoomToFit | CenterToFit |
arrangeHorizontally | ArrangeHorizont |
arrangeVertically | ArrangeVertical |
toggleNotificationPanel | NotificationCounter |
paletteOpen | OpenPanelFilledLeft |
paletteClose | OpenPanelFilledLeft |
paletteToggle | OpenPanelFilledLeft |
expandSuperNodeInPlace | Maximize |
collapseSuperNodeInPlace | Minimize |
displaySubPipeline | Launch |