Class: ProcedureDelete
Defined in: plugins/block-shareable-procedures/src/events_procedure_delete.ts:14
Notifies listeners that a procedure data model has been deleted.
Extends
Properties index
| Property | Description |
|---|---|
| group | An ID for the group of events this block is associated with. |
| isBlank | Whether or not the event was constructed without necessary parameters (to be populated by fromJson). |
| isUiEvent | Whether or not the event is a UI event. |
| procedure | The procedure model associated with this event. |
| recordUndo | Whether this event is undoable or not. |
| type | A string used to check the type of the event. |
| workspaceId | The workspace identifier for this event. |
| TYPE | - |
Methods index
| Method | Description |
|---|---|
| getEventWorkspace_ | Get workspace the event belongs to. |
| isNull | Does this event record any change of state? |
| run | Replays the event in the workspace. |
| toJson | Encode the event as JSON. |
Constructors
Constructor
new ProcedureDelete(workspace, procedure): ProcedureDelete;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:26
Constructs the base procedure event.
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace | Workspace | The workspace the procedure model exists in. |
procedure | IProcedureModel | The procedure model associated with this event. |
Returns
ProcedureDelete
Inherited from
Properties
group
group: string;
An ID for the group of events this block is associated with.
Groups define events that should be treated as an single action from the user's perspective, and should be undone together.
Inherited from
isBlank
isBlank: boolean = false;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:18
Whether or not the event was constructed without necessary parameters (to be populated by fromJson).
Inherited from
isUiEvent
isUiEvent: boolean;
Whether or not the event is a UI event.
Inherited from
procedure
readonly procedure: IProcedureModel;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:28
The procedure model associated with this event.
Inherited from
recordUndo
recordUndo: boolean;
Whether this event is undoable or not.
Inherited from
type
type: string = ProcedureDelete.TYPE;
Defined in: plugins/block-shareable-procedures/src/events_procedure_delete.ts:18
A string used to check the type of the event.
Overrides
workspaceId?
workspaceId?: string;
The workspace identifier for this event.
Inherited from
TYPE
readonly static TYPE: "procedure_delete" = 'procedure_delete';
Defined in: plugins/block-shareable-procedures/src/events_procedure_delete.ts:15
Overrides
Methods
getEventWorkspace_()
getEventWorkspace_(): Workspace;
Get workspace the event belongs to.
Returns
Workspace
The workspace the event belongs to.
Throws
if workspace is null.
Inherited from
ProcedureBase.getEventWorkspace_
isNull()
isNull(): boolean;
Does this event record any change of state?
Returns
boolean
True if null, false if something changed.
Inherited from
run()
run(forward): void;
Defined in: plugins/block-shareable-procedures/src/events_procedure_delete.ts:26
Replays the event in the workspace.
Parameters
| Parameter | Type | Description |
|---|---|---|
forward | boolean | if true, play the event forward (redo), otherwise play it backward (undo). |
Returns
void
Overrides
toJson()
toJson(): ProcedureBaseJson;
Defined in: plugins/block-shareable-procedures/src/events_procedure_delete.ts:43
Encode the event as JSON.
Returns
JSON representation.