Interface: IDragger
Defined in: packages/blockly/core/interfaces/i_dragger.ts:10
Methods index
| Method | Description |
|---|---|
| onDragStart | Handles any drag startup. |
| onDrag | Handles dragging, including calculating where the element should actually be moved to. |
| onDragEnd | Handles any drag cleanup when a drag finishes normally. |
| onDragRevert | Handles any drag cleanup when a drag is reverted. |
Methods
onDragStart()
onDragStart(e?): IDraggable;
Defined in: packages/blockly/core/interfaces/i_dragger.ts:16
Handles any drag startup.
Parameters
| Parameter | Type | Description |
|---|---|---|
e? | PointerEvent | KeyboardEvent | Event that started the drag. |
Returns
onDrag()
onDrag(e, totalDelta): void;
Defined in: packages/blockly/core/interfaces/i_dragger.ts:26
Handles dragging, including calculating where the element should actually be moved to.
Parameters
| Parameter | Type | Description |
|---|---|---|
e | PointerEvent | KeyboardEvent | undefined | Event that continued the drag. |
totalDelta | Coordinate | The total distance, in pixels, that the draggable has moved since the start of the drag. |
Returns
void
onDragEnd()
onDragEnd(e, totalDelta): void;
Defined in: packages/blockly/core/interfaces/i_dragger.ts:38
Handles any drag cleanup when a drag finishes normally.
Parameters
| Parameter | Type | Description |
|---|---|---|
e | PointerEvent | KeyboardEvent | undefined | Event that finished the drag. |
totalDelta | Coordinate | The total distance, in pixels, that the draggable has moved since the start of the drag. |
Returns
void
onDragRevert()
onDragRevert(e, totalDelta): void;
Defined in: packages/blockly/core/interfaces/i_dragger.ts:50
Handles any drag cleanup when a drag is reverted.
Parameters
| Parameter | Type | Description |
|---|---|---|
e | PointerEvent | KeyboardEvent | undefined | Event that finished the drag. |
totalDelta | Coordinate | The total distance, in pixels, that the draggable has moved since the start of the drag. |
Returns
void