Skip to main content

Home > blockly > comments > CommentBarButton

comments.CommentBarButton class

Button displayed on a comment's top bar.

Signature:

export declare abstract class CommentBarButton implements IFocusableNode 

Implements: IFocusableNode

Constructors

ConstructorModifiersDescription
(constructor)(id, workspace, container, commentView)Creates a new CommentBarButton instance.

Properties

PropertyModifiersTypeDescription
commentViewprotected readonlyCommentView
containerprotected readonlySVGGElement
iconprotected abstract readonlySVGImageElementSVG image displayed on this button.
idprotected readonlystring
workspaceprotected readonlyWorkspaceSvg

Methods

MethodModifiersDescription
canBeFocused()Returns whether this button can be focused. True if it is visible.
getCommentView()Returns the parent comment view of this comment bar button.
getFocusableElement()Returns a DOM element representing this button that can receive focus.
getFocusableTree()Returns the workspace this button is a child of.
getMargin()Returns the margin in workspace coordinates surrounding this button.
getSize(includeMargin)Returns the dimensions of this button in workspace coordinates.
isVisible()Returns whether or not this button is currently visible.
onNodeBlur()Called when this button's focusable DOM element loses focus.
onNodeFocus()Called when this button's focusable DOM element gains focus.
performAction(e)abstractPerform the action this button should take when it is acted on.
reposition()abstractAdjusts the position of this button within its parent container.