ActionStateManager
Internal manager for temporary state during ongoing user actions. Tracks the state of interactive operations like resizing, linking, rotating, and dragging until the action completes.
Remarks
Section titled “Remarks”For application code, use NgDiagramService.actionState signal instead.
This class is exposed primarily for middleware development where you can access it
via context.actionStateManager.
Example
Section titled “Example”const middleware: Middleware = { name: 'resize-validator', execute: (context, next, cancel) => { const resizeState = context.actionStateManager.resize; if (resizeState) { console.log('Currently resizing node:', resizeState.nodeId); } next(); }};Accessors
Section titled “Accessors”copyPaste
Section titled “copyPaste”Get Signature
Section titled “Get Signature”get copyPaste():
undefined|CopyPasteActionState
Gets the current copy/paste action state.
Returns
Section titled “Returns”undefined | CopyPasteActionState
The copy/paste state if a copy/paste operation is in progress, undefined otherwise
Set Signature
Section titled “Set Signature”set copyPaste(
value):void
Sets the copy/paste action state.
Parameters
Section titled “Parameters”The copy/paste state to set, or undefined to clear
undefined | CopyPasteActionState
Returns
Section titled “Returns”void
dragging
Section titled “dragging”Get Signature
Section titled “Get Signature”get dragging():
undefined|DraggingActionState
Gets the current dragging action state.
Returns
Section titled “Returns”undefined | DraggingActionState
The dragging state if nodes are being dragged, undefined otherwise
Set Signature
Section titled “Set Signature”set dragging(
value):void
Sets the dragging action state.
Parameters
Section titled “Parameters”The dragging state to set, or undefined to clear
undefined | DraggingActionState
Returns
Section titled “Returns”void
highlightGroup
Section titled “highlightGroup”Get Signature
Section titled “Get Signature”get highlightGroup():
undefined|HighlightGroupActionState
Gets the current highlight group action state.
Returns
Section titled “Returns”undefined | HighlightGroupActionState
The highlight group state if a group is being highlighted, undefined otherwise
Set Signature
Section titled “Set Signature”set highlightGroup(
value):void
Sets the highlight group action state.
Parameters
Section titled “Parameters”The highlight group state to set, or undefined to clear
undefined | HighlightGroupActionState
Returns
Section titled “Returns”void
linking
Section titled “linking”Get Signature
Section titled “Get Signature”get linking():
undefined|LinkingActionState
Gets the current linking action state.
Returns
Section titled “Returns”undefined | LinkingActionState
The linking state if a link is being created, undefined otherwise
Set Signature
Section titled “Set Signature”set linking(
value):void
Sets the linking action state.
Parameters
Section titled “Parameters”The linking state to set, or undefined to clear
undefined | LinkingActionState
Returns
Section titled “Returns”void
resize
Section titled “resize”Get Signature
Section titled “Get Signature”get resize():
undefined|ResizeActionState
Gets the current resize action state.
Returns
Section titled “Returns”undefined | ResizeActionState
The resize state if a resize is in progress, undefined otherwise
Set Signature
Section titled “Set Signature”set resize(
value):void
Sets the resize action state.
Parameters
Section titled “Parameters”The resize state to set, or undefined to clear
undefined | ResizeActionState
Returns
Section titled “Returns”void
rotation
Section titled “rotation”Get Signature
Section titled “Get Signature”get rotation():
undefined|RotationActionState
Gets the current rotation action state.
Returns
Section titled “Returns”undefined | RotationActionState
The rotation state if a rotation is in progress, undefined otherwise
Set Signature
Section titled “Set Signature”set rotation(
value):void
Sets the rotation action state.
Parameters
Section titled “Parameters”The rotation state to set, or undefined to clear
undefined | RotationActionState
Returns
Section titled “Returns”void
Methods
Section titled “Methods”clearCopyPaste()
Section titled “clearCopyPaste()”clearCopyPaste():
void
Clears the copy/paste action state.
Returns
Section titled “Returns”void
clearDragging()
Section titled “clearDragging()”clearDragging():
void
Clears the dragging action state.
Returns
Section titled “Returns”void
clearHighlightGroup()
Section titled “clearHighlightGroup()”clearHighlightGroup():
void
Clears the highlight group action state.
Returns
Section titled “Returns”void
clearLinking()
Section titled “clearLinking()”clearLinking():
void
Clears the linking action state.
Returns
Section titled “Returns”void
clearResize()
Section titled “clearResize()”clearResize():
void
Clears the resize action state.
Returns
Section titled “Returns”void
clearRotation()
Section titled “clearRotation()”clearRotation():
void
Clears the rotation action state.
Returns
Section titled “Returns”void
getState()
Section titled “getState()”getState():
Readonly<ActionState>
Gets the current action state (readonly).
Returns
Section titled “Returns”Readonly<ActionState>
The complete action state object
isDragging()
Section titled “isDragging()”isDragging():
boolean
Checks if a dragging operation is currently in progress.
Returns
Section titled “Returns”boolean
isLinking()
Section titled “isLinking()”isLinking():
boolean
Checks if a linking operation is currently in progress.
Returns
Section titled “Returns”boolean
isResizing()
Section titled “isResizing()”isResizing():
boolean
Checks if a resize operation is currently in progress.
Returns
Section titled “Returns”boolean
isRotating()
Section titled “isRotating()”isRotating():
boolean
Checks if a rotation operation is currently in progress.
Returns
Section titled “Returns”boolean