blockly > IDragStrategy > drag
IDragStrategy.drag() method
Handles moving elements to the new location, and updating any visuals based on that (e.g connection previews for blocks).
Signature:
drag(newLoc: Coordinate, e?: PointerEvent | KeyboardEvent): void;
Parameters
Parameter | Type | Description |
|---|---|---|
newLoc | Workspace coordinate to which the draggable has been dragged. | |
e | PointerEvent | KeyboardEvent | (Optional) Event that continued the drag. Can be used to check modifier keys, etc. |
Returns:
void