blockly > IDragStrategy

IDragStrategy interface

Signature:

export interface IDragStrategy 

Methods

Method Description
drag(newLoc, e) Handles moving elements to the new location, and updating any visuals based on that (e.g connection previews for blocks).
endDrag(e) Handles any drag cleanup, including e.g. connecting or deleting blocks.
isMovable() Returns true iff the element is currently movable.
revertDrag() Moves the draggable back to where it was at the start of the drag.
startDrag(e) Handles any drag startup (e.g moving elements to the front of the workspace).