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 |
---|---|---|
(constructor)(opt_comment) | Constructs a new instance of the CommentMove class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
comment_? | WorkspaceComment | (Optional) The comment that is being moved. | |
newCoordinate_? | Coordinate | (Optional) The location of the comment after the move, in workspace coordinates. | |
oldCoordinate_? | Coordinate | (Optional) The location of the comment before the move, in workspace coordinates. | |
type | string |
Methods
Method | Modifiers | Description |
---|---|---|
isNull() | Does this event record any change of state? | |
recordNew() | Record the comment's new location. Called after the move. Can only be called once. | |
run(forward) | Run a move event. | |
setOldCoordinate(xy) | 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. | |
toJson() | Encode the event as JSON. |