Class: BubbleOpen
Defined in: packages/blockly/core/events/events_bubble_open.ts:25
Class for a bubble open event.
Extends
Properties index
| Property | Description |
|---|---|
| group | An ID for the group of events this block is associated with. |
| blockId | The ID of the block the bubble is attached to. |
| isOpen | True if the bubble is opening, false if closing. |
| bubbleType | The type of bubble; one of 'mutator', 'comment', or 'warning'. |
| type | Type of this event. |
| isBlank | Whether or not the event was constructed without necessary parameters (to be populated by fromJson). |
| workspaceId | The workspace identifier for this event. |
| recordUndo | Whether this event is undoable or not. |
| isUiEvent | Whether or not the event is a UI event. |
Methods index
| Method | Description |
|---|---|
| isNull | Does this event record any change of state? |
| run | Run an event. |
| getEventWorkspace_ | Get workspace the event belongs to. |
| toJson | Encode the event as JSON. |
Constructors
Constructor
new BubbleOpen(
opt_block?,
opt_isOpen?,
opt_bubbleType?
): BubbleOpen;
Defined in: packages/blockly/core/events/events_bubble_open.ts:44
Parameters
| Parameter | Type | Description |
|---|---|---|
opt_block? | BlockSvg | The associated block. Undefined for a blank event. |
opt_isOpen? | boolean | Whether the bubble is opening (false if closing). Undefined for a blank event. |
opt_bubbleType? | BubbleType | The type of bubble. One of 'mutator', 'comment' or 'warning'. Undefined for a blank event. |
Returns
BubbleOpen
Overrides
Properties
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
blockId?
optional blockId?: string;
Defined in: packages/blockly/core/events/events_bubble_open.ts:27
The ID of the block the bubble is attached to.
isOpen?
optional isOpen?: boolean;
Defined in: packages/blockly/core/events/events_bubble_open.ts:30
True if the bubble is opening, false if closing.
bubbleType?
optional bubbleType?: BubbleType;
Defined in: packages/blockly/core/events/events_bubble_open.ts:33
The type of bubble; one of 'mutator', 'comment', or 'warning'.
type
type: EventType = EventType.BUBBLE_OPEN;
Defined in: packages/blockly/core/events/events_bubble_open.ts:35
Type of this event.
Overrides
isBlank
isBlank: boolean = true;
Defined in: packages/blockly/core/events/events_ui_base.ts:25
Whether or not the event was constructed without necessary parameters (to be populated by fromJson).
Inherited from
workspaceId
workspaceId: string;
Defined in: packages/blockly/core/events/events_ui_base.ts:26
The workspace identifier for this event.
Inherited from
recordUndo
recordUndo: boolean = false;
Defined in: packages/blockly/core/events/events_ui_base.ts:29
Whether this event is undoable or not.
Inherited from
isUiEvent
isUiEvent: boolean = true;
Defined in: packages/blockly/core/events/events_ui_base.ts:32
Whether or not the event is a UI event.
Inherited from
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
run()
run(_forward): void;
Defined in: packages/blockly/core/events/events_abstract.ts:100
Run an event.
Parameters
| Parameter | Type | Description |
|---|---|---|
_forward | boolean | True if run forward, false if run backward (undo). |
Returns
void
Inherited from
getEventWorkspace_()
getEventWorkspace_(): Workspace;
Defined in: packages/blockly/core/events/events_abstract.ts:111
Get workspace the event belongs to.
Returns
The workspace the event belongs to.
Throws
if workspace is null.
Inherited from
toJson()
toJson(): BubbleOpenJson;
Defined in: packages/blockly/core/events/events_bubble_open.ts:63
Encode the event as JSON.
Returns
JSON representation.