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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(id, workspace, container) | Creates a new CommentBarButton instance. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
container |
|
SVGGElement | |
icon |
|
SVGImageElement | SVG image displayed on this button. |
id |
|
string | |
workspace |
|
WorkspaceSvg |
Methods
Method | Modifiers | Description |
---|---|---|
canBeFocused() | Returns whether this button can be focused. True if it is visible. | |
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. | |
getParentComment() | Returns the parent comment of this comment bar 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) | abstract |
Perform the action this button should take when it is acted on. |
reposition() | abstract |
Adjusts the position of this button within its parent container. |