Class: CommentDragStrategy
Defined in: packages/blockly/core/dragging/comment_drag_strategy.ts:16
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 CommentDragStrategy(comment): CommentDragStrategy;
Defined in: packages/blockly/core/dragging/comment_drag_strategy.ts:21
Parameters
| Parameter | Type |
|---|---|
comment | RenderedWorkspaceComment |
Returns
CommentDragStrategy
Methods
isMovable()
isMovable(): boolean;
Defined in: packages/blockly/core/dragging/comment_drag_strategy.ts:25
Returns true iff the element is currently movable.
Returns
boolean
Implementation of
startDrag()
startDrag(): RenderedWorkspaceComment;
Defined in: packages/blockly/core/dragging/comment_drag_strategy.ts:33
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/comment_drag_strategy.ts:42
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/comment_drag_strategy.ts:46
Handles any drag cleanup, including e.g. connecting or deleting blocks.
Returns
void
Implementation of
revertDrag()
revertDrag(): void;
Defined in: packages/blockly/core/dragging/comment_drag_strategy.ts:91
Moves the draggable back to where it was at the start of the drag.
Returns
void