Skip to main content

Home > blockly > comments > WorkspaceComment

comments.WorkspaceComment class

Signature:

export declare class WorkspaceComment 

Constructors

ConstructorModifiersDescription
(constructor)(workspace, id)Constructs the comment.

Properties

PropertyModifiersTypeDescription
disposedprotectedbooleanWhether this comment has been disposed or not.
disposingprotectedbooleanWhether this comment is being disposed or not.
idreadonlystringThe unique identifier for this comment.
locationprotectedCoordinateThe location of the comment in workspace coordinates.
workspacereadonlyWorkspace

Methods

MethodModifiersDescription
dispose()Disposes of this comment.
getRelativeToSurfaceXY()Returns the position of the comment in workspace coordinates.
getSize()Returns the comment's size in workspace units.
getText()Returns the text of the comment.
isCollapsed()Returns whether the comment is collapsed or not.
isDeadOrDying()Returns true if this comment view is currently being disposed or has already been disposed.
isDeletable()Returns whether the comment is deletable or not, respecting whether the workspace is read-only.
isDisposed()Returns whether the comment has been disposed or not.
isEditable()Returns whether the comment is editable or not, respecting whether the workspace is read-only.
isMovable()Returns whether the comment is movable or not, respecting whether the workspace is read-only.
isOwnDeletable()Returns whether the comment is deletable or not, only examining its own state and ignoring the state of the workspace.
isOwnEditable()Returns whether the comment is editable or not, only examining its own state and ignoring the state of the workspace.
isOwnMovable()Returns whether the comment is movable or not, only examining its own state and ignoring the state of the workspace.
moveTo(location, reason)Moves the comment to the given location in workspace coordinates.
setCollapsed(collapsed)Sets whether the comment is collapsed or not.
setDeletable(deletable)Sets whether the comment is deletable or not.
setEditable(editable)Sets whether the comment is editable or not.
setMovable(movable)Sets whether the comment is movable or not.
setSize(size)Sets the comment's size in workspace units.
setText(text)Sets the text of the comment.