blockly > 事件 > CommentMove
Events.CommentMove 类
通知监听器工作区评论已移动。
Signature:
export declare class CommentMove extends CommentBase
扩展:CommentBase
构造函数
构造函数 | 修饰符 | 说明 |
---|---|---|
(constructor)(opt_comment) | 构造 CommentMove 类的新实例 |
属性
媒体资源 | 修饰符 | 类型 | 说明 |
---|---|---|---|
comment_? | WorkspaceComment | (可选)要移动的评论。 | |
newCoordinate_? | 坐标 | (可选)移动后评论所在的位置(以工作区坐标表示)。 | |
oldCoordinate_? | 坐标 | (可选)移动前评论所在的位置(以工作区坐标表示)。 | |
type | string |
方法
方法 | 修饰符 | 说明 |
---|---|---|
isNull() | 此事件是否会记录任何状态变化? | |
recordNew() | 记录评论的新位置。在移动后调用。只能调用一次。 | |
run(正向) | 开展移动事件。 | |
setOldCoordinate(xy) | 移动之前覆盖之前的位置。如果您在移动操作结束前才创建活动,但知道原始位置,请使用此选项。 | |
toJson() | 将事件编码为 JSON。 |