blockly > Events > CommentMove
Events.CommentMove class
Notifies listeners that a workspace comment has moved.
Signature:
export declare class CommentMove extends CommentBase
Extends: CommentBase
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(Optional) The comment that is being moved. | |||
(Optional) The location of the comment after the move, in workspace coordinates. | |||
(Optional) The location of the comment before the move, in workspace coordinates. | |||
string[] | (Optional) An explanation of what this move is for. Known values include: 'drag' -- A drag operation completed. 'snap' -- Comment got shifted to line up with the grid. 'inbounds' -- Block got pushed back into a non-scrolling workspace. 'create' -- Block created via deserialization. 'cleanup' -- Workspace aligned top-level blocks. Event merging may create multiple reasons: ['drag', 'inbounds', 'snap']. | ||
EventType |
Methods
Method | Modifiers | Description |
|---|---|---|
Does this event record any change of state? | ||
Record the comment's new location. Called after the move. Can only be called once. | ||
Run a move event. | ||
Override the location before the move. Use this if you don't create the event until the end of the move, but you know the original location. | ||
Sets the reason for a move event. | ||
Encode the event as JSON. |