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

Constructor Modifiers Description
(constructor)(opt_block, opt_isStart, opt_blocks) Constructs a new instance of the BlockDrag class

Properties

Property Modifiers Type Description
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.
type string

Methods

Method Modifiers Description
toJson() Encode the event as JSON.