Skip to main content

Home > blockly > Events > BlockDrag

Events.BlockDrag class

Notifies listeners when a block is being manually dragged/dropped.

Signature:

export declare class BlockDrag extends UiBase 

Extends: UiBase

Constructors

ConstructorModifiersDescription
(constructor)(opt_block, opt_isStart, opt_blocks)Constructs a new instance of the BlockDrag class

Properties

PropertyModifiersTypeDescription
blockId?string(Optional) The ID of the top-level block being dragged.
blocks?Block[](Optional) A list of all of the blocks (i.e. all descendants of the block associated with the block ID) being dragged.
isStart?boolean(Optional) True if this is the start of a drag, false if this is the end of one.
typeEventType

Methods

MethodModifiersDescription
toJson()Encode the event as JSON.