Class: BubbleDragStrategy
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:13
Implements
Methods index
| Method | Description |
|---|---|
| isMovable | Returns true iff the element is currently movable. |
| startDrag | Handles any drag startup (e.g moving elements to the front of the workspace). |
| drag | Handles moving elements to the new location, and updating any visuals based on that (e.g connection previews for blocks). |
| endDrag | Handles any drag cleanup, including e.g. connecting or deleting blocks. |
| revertDrag | Moves the draggable back to where it was at the start of the drag. |
Constructors
Constructor
new BubbleDragStrategy(bubble, workspace): BubbleDragStrategy;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:16
Parameters
| Parameter | Type |
|---|---|
bubble | IBubble |
workspace | WorkspaceSvg |
Returns
BubbleDragStrategy
Methods
isMovable()
isMovable(): boolean;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:21
Returns true iff the element is currently movable.
Returns
boolean
Implementation of
startDrag()
startDrag(): IBubble;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:25
Handles any drag startup (e.g moving elements to the front of the workspace).
Returns
Implementation of
drag()
drag(newLoc): void;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:36
Handles moving elements to the new location, and updating any visuals based on that (e.g connection previews for blocks).
Parameters
| Parameter | Type | Description |
|---|---|---|
newLoc | Coordinate | Workspace coordinate to which the draggable has been dragged. |
Returns
void
Implementation of
endDrag()
endDrag(): void;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:40
Handles any drag cleanup, including e.g. connecting or deleting blocks.
Returns
void
Implementation of
revertDrag()
revertDrag(): void;
Defined in: packages/blockly/core/dragging/bubble_drag_strategy.ts:49
Moves the draggable back to where it was at the start of the drag.
Returns
void