Skip to main content

Events

Classes

ClassDescription
AbstractAbstract class for an event.
BlockBaseAbstract class for any event related to blocks.
BlockChangeNotifies listeners when some element of a block has changed (e.g. field values, comments, etc).
BlockCreateNotifies listeners when a block (or connected stack of blocks) is created.
BlockDeleteNotifies listeners when a block (or connected stack of blocks) is deleted.
BlockDragNotifies listeners when a block is being manually dragged/dropped.
BlockFieldIntermediateChangeNotifies listeners when the value of a block's field has changed but the change is not yet complete, and is expected to be followed by a block change event.
BlockMoveNotifies listeners when a block is moved. This could be from one connection to another, or from one location on the workspace to another.
BubbleOpenClass for a bubble open event.
ClickNotifies listeners that some blockly element was clicked.
CommentBaseAbstract class for a comment event.
CommentChangeNotifies listeners that the contents of a workspace comment has changed.
CommentCollapseAbstract class for a comment event.
CommentCreateNotifies listeners that a workspace comment was created.
CommentDeleteNotifies listeners that a workspace comment has been deleted.
CommentDragNotifies listeners when a comment is being manually dragged/dropped.
CommentMoveNotifies listeners that a workspace comment has moved.
CommentResizeNotifies listeners that a workspace comment has resized.
SelectedClass for a selected event. Notifies listeners that a new element has been selected.
ThemeChangeNotifies listeners that the workspace theme has changed.
ToolboxItemSelectNotifies listeners that a toolbox item has been selected.
TrashcanOpenNotifies listeners when the trashcan is opening or closing.
UiBaseBase class for a UI event. UI events are events that don't need to be sent over the wire for multi-user editing to work (e.g. scrolling the workspace, zooming, opening toolbox categories). UI events do not undo or redo.
VarBaseAbstract class for a variable event.
VarCreateNotifies listeners that a variable model has been created.
VarDeleteNotifies listeners that a variable model has been deleted.
VarRenameNotifies listeners that a variable model was renamed.
VarTypeChangeNotifies listeners that a variable's type has changed.
ViewportChangeNotifies listeners that the workspace surface's position or scale has changed.
FinishedLoadingNotifies listeners when the workspace has finished deserializing from JSON/XML.

Enumerations

EnumerationDescription
BubbleType-
ClickTarget-

Functions

FunctionDescription
setRecordUndoSets whether events should be added to the undo stack.
getRecordUndoReturns whether or not events will be added to the undo stack.
fireEnqueue an event to be dispatched to change listeners.
filterFilter the queued events by merging duplicates, removing null events and reording BlockChange events.
clearPendingUndoModify pending undo events so that when they are fired they don't land in the undo stack. Called by Workspace.clearUndo.
disableStop sending events. Every call to this function MUST also call enable.
enableStart sending events. Unless events were already disabled when the corresponding call to disable was made.
isEnabledReturns whether events may be fired or not.
getGroupCurrent group.
setGroupStart or stop a group.
fromJsonDecode the JSON into an event.
getGets the class for a specific event type from the registry.
disableOrphansSet if a block is disabled depending on whether it is properly connected. Use this on applications where all blocks should be connected to a top block.

Interfaces

InterfaceDescription
AbstractEventJson-
BlockBaseJson-
BlockChangeJson-
BlockCreateJson-
BlockDeleteJson-
BlockDragJson-
BlockFieldIntermediateChangeJson-
BlockMoveJson-
BubbleOpenJson-
ClickJson-
CommentBaseJson-
CommentChangeJson-
CommentCollapseJson-
CommentCreateJson-
CommentDragJson-
CommentMoveJson-
CommentResizeJson-
SelectedJson-
ThemeChangeJson-
ToolboxItemSelectJson-
TrashcanOpenJson-
VarBaseJson-
VarCreateJson-
VarDeleteJson-
VarRenameJson-
VarTypeChangeJson-
ViewportChangeJson-

Variables

VariableDescription
BLOCK_CHANGE-
BLOCK_CREATE-
BLOCK_DELETE-
BLOCK_DRAG-
BLOCK_MOVE-
BLOCK_FIELD_INTERMEDIATE_CHANGE-
BUBBLE_OPEN-
CHANGE-
CLICK-
COMMENT_CHANGE-
COMMENT_CREATE-
COMMENT_DELETE-
COMMENT_MOVE-
COMMENT_RESIZE-
COMMENT_DRAG-
CREATE-
DELETE-
FINISHED_LOADING-
MOVE-
SELECTED-
THEME_CHANGE-
TOOLBOX_ITEM_SELECT-
TRASHCAN_OPEN-
UI-
VAR_CREATE-
VAR_DELETE-
VAR_RENAME-
VIEWPORT_CHANGE-
BUMP_EVENTSList of events that cause objects to be bumped back into the visible portion of the workspace.

Type Aliases

Type AliasDescription
BumpEventType of events that cause objects to be bumped back into the visible portion of the workspace.