blockly > Events > BlockMove > reason

Events.BlockMove.reason property

An explanation of what this move is for. Known values include: 'drag' -- A drag operation completed. 'bump' -- Block got bumped away from an invalid connection. 'snap' -- Block got shifted to line up with the grid. 'inbounds' -- Block got pushed back into a non-scrolling workspace. 'connect' -- Block got connected to another block. 'disconnect' -- Block got disconnected from another block. 'create' -- Block created via XML. 'cleanup' -- Workspace aligned top-level blocks. Event merging may create multiple reasons: ['drag', 'bump', 'snap'].

Signature:

reason?: string[];