Skip to main content

Class: CommentDelete

Defined in: packages/blockly/core/events/events_comment_delete.ts:25

Notifies listeners that a workspace comment has been deleted.

Extends​

Properties index​

PropertyDescription
workspaceIdThe workspace identifier for this event.
groupAn ID for the group of events this block is associated with.
recordUndoWhether this event is undoable or not.
isUiEventWhether or not the event is a UI event.
isBlankWhether or not the event was constructed without necessary parameters (to be populated by fromJson).
commentIdThe ID of the comment that this event references.
typeType of this event.
jsonThe JSON representation of the created workspace comment.

Methods index​

MethodDescription
isNullDoes this event record any change of state?
getEventWorkspace_Get workspace the event belongs to.
CommentCreateDeleteHelperHelper function for Comment[Create
runRun a creation event.
toJsonEncode the event as JSON.

Constructors​

Constructor​

new CommentDelete(opt_comment?): CommentDelete;

Defined in: packages/blockly/core/events/events_comment_delete.ts:35

Parameters​

ParameterTypeDescription
opt_comment?WorkspaceCommentThe deleted comment. Undefined for a blank event.

Returns​

CommentDelete

Overrides​

CommentBase.constructor

Properties​

workspaceId?​

optional workspaceId?: string = undefined;

Defined in: packages/blockly/core/events/events_abstract.ts:30

The workspace identifier for this event.

Inherited from​

CommentBase.workspaceId


group​

group: string;

Defined in: packages/blockly/core/events/events_abstract.ts:38

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​

CommentBase.group


recordUndo​

recordUndo: boolean;

Defined in: packages/blockly/core/events/events_abstract.ts:41

Whether this event is undoable or not.

Inherited from​

CommentBase.recordUndo


isUiEvent​

isUiEvent: boolean = false;

Defined in: packages/blockly/core/events/events_abstract.ts:44

Whether or not the event is a UI event.

Inherited from​

CommentBase.isUiEvent


isBlank​

isBlank: boolean = true;

Defined in: packages/blockly/core/events/events_comment_base.ts:27

Whether or not the event was constructed without necessary parameters (to be populated by fromJson).

Inherited from​

CommentBase.isBlank


commentId?​

optional commentId?: string;

Defined in: packages/blockly/core/events/events_comment_base.ts:30

The ID of the comment that this event references.

Inherited from​

CommentBase.commentId


type​

type: EventType = EventType.COMMENT_DELETE;

Defined in: packages/blockly/core/events/events_comment_delete.ts:26

Type of this event.

Overrides​

CommentBase.type


json?​

optional json?: State;

Defined in: packages/blockly/core/events/events_comment_delete.ts:29

The JSON representation of the created workspace comment.

Methods​

isNull()​

isNull(): boolean;

Defined in: packages/blockly/core/events/events_abstract.ts:91

Does this event record any change of state?

Returns​

boolean

True if null, false if something changed.

Inherited from​

CommentBase.isNull


getEventWorkspace_()​

getEventWorkspace_(): Workspace;

Defined in: packages/blockly/core/events/events_abstract.ts:111

Get workspace the event belongs to.

Returns​

Workspace

The workspace the event belongs to.

Throws​

if workspace is null.

Inherited from​

CommentBase.getEventWorkspace_


CommentCreateDeleteHelper()​

static CommentCreateDeleteHelper(event, create): void;

Defined in: packages/blockly/core/events/events_comment_base.ts:95

Helper function for Comment[Create|Delete]

Parameters​

ParameterTypeDescription
eventCommentCreate | CommentDeleteThe event to run.
createbooleanif True then Create, if False then Delete

Returns​

void

Inherited from​

CommentBase.CommentCreateDeleteHelper


run()​

run(forward): void;

Defined in: packages/blockly/core/events/events_comment_delete.ts:50

Run a creation event.

Parameters​

ParameterTypeDescription
forwardbooleanTrue if run forward, false if run backward (undo).

Returns​

void

Overrides​

CommentBase.run


toJson()​

toJson(): CommentDeleteJson;

Defined in: packages/blockly/core/events/events_comment_delete.ts:59

Encode the event as JSON.

Returns​

CommentDeleteJson

JSON representation.

Overrides​

CommentBase.toJson