Skip to main content

blockly > comments > CollapseCommentBarButton

comments.CollapseCommentBarButton class

Button that toggles the collapsed state of a comment.

Signature:

export declare class CollapseCommentBarButton extends CommentBarButton

Extends: CommentBarButton

Constructors

Constructor

Modifiers

Description

(constructor)(id, workspace, container, commentView)

Creates a new CollapseCommentBarButton instance.

Properties

Property

Modifiers

Type

Description

commentView

protected

readonly

CommentView

container

protected

readonly

SVGGElement

icon

protected

readonly

SVGImageElement

SVG image displayed on this button.

id

protected

readonly

string

workspace

protected

readonly

WorkspaceSvg

Methods

Method

Modifiers

Description

dispose()

Disposes of this button.

getAriaLabel()

protected

Returns the ARIA label to use for this button (defaults to null). Note that this method will only be called and apply when recomputeAriaContext is called.

performAction(e)

Toggles the collapsed state of the parent comment.

reposition()

Adjusts the positioning of this button within its container.