blockly > dragging > BlockDragStrategy

dragging.BlockDragStrategy class

Signature:

export declare class BlockDragStrategy implements IDragStrategy 

Implements: IDragStrategy

Constructors

Constructor Modifiers Description
(constructor)(block) Constructs a new instance of the BlockDragStrategy class

Methods

Method Modifiers Description
drag(newLoc) Moves the block and updates any connection previews.
endDrag() Cleans up any state at the end of the drag. Applies any pending connections.
isMovable() Returns true if the block is currently movable. False otherwise.
revertDrag() Moves the block back to where it was at the beginning of the drag, including reconnecting connections.
startDrag(e) Handles any setup for starting the drag, including disconnecting the block from any parent blocks.