commands
The individual commands, namespaced because names like copy and addNode also exist in the model.
Functions
commandState()
function commandState(command, context): CommandState;
Parameters
| Parameter | Type |
|---|---|
command | Command |
context | CommandContext |
Returns
matchesShortcut()
function matchesShortcut(event, shortcut): boolean;
Parameters
| Parameter | Type |
|---|---|
event | KeyboardEvent |
shortcut | string |
Returns
boolean
shortcutLabel()
function shortcutLabel(shortcut): string;
Parameters
| Parameter | Type |
|---|---|
shortcut | string |
Returns
string
References
WireTarget
Re-exports WireTarget
CommandContext
Re-exports CommandContext
CanvasActions
Re-exports CanvasActions
registerCanvas
Re-exports registerCanvas
CommandState
Re-exports CommandState
Command
Re-exports Command
CommandEntry
Re-exports CommandEntry
ResolvedCommand
Re-exports ResolvedCommand
resolveCommands
Re-exports resolveCommands
attempt
Re-exports attempt
execute
Re-exports execute
TOOLBAR_COMMANDS
Re-exports TOOLBAR_COMMANDS
CONTEXT_MENU_COMMANDS
Re-exports CONTEXT_MENU_COMMANDS
SHORTCUT_COMMANDS
Re-exports SHORTCUT_COMMANDS
useCommandContext
Re-exports useCommandContext
useCommandShortcuts
Re-exports useCommandShortcuts
Type Aliases
GraphProjection
type GraphProjection = object;
Properties
nodes
nodes: GraphNode[];
edges
edges: GraphEdge[];
Variables
MATERIALX_CLIPBOARD_TYPE
const MATERIALX_CLIPBOARD_TYPE: "mtlx-editor/nodes" = 'mtlx-editor/nodes';
Tag on the clipboard JSON so paste can tell node data from other text.
undo
const undo: Command;
redo
const redo: Command;
copy
const copy: Command;
cut
const cut: Command;
paste
const paste: Command;
duplicate
const duplicate: Command;
group
const group: Command;
remove
const remove: Command;
search
const search: Command;
Opens the searchable node picker; only surfaces that can place a node offer it.
disconnect
const disconnect: Command;
reset
const reset: Command;
notConnected
const notConnected: Command;
Placeholder so a right-clicked bare port still opens a menu.
addNode
const addNode: Command;
Canvas commands; they hide until a canvas for the session mounts.
zoomIn
const zoomIn: Command;
zoomOut
const zoomOut: Command;
fitView
const fitView: Command;
arrange
const arrange: Command;