Skip to main content

blockly > bubbles > TextInputBubble

bubbles.TextInputBubble class

A bubble that displays editable text. It can also be resized by the user. Used by the comment icon.

Signature:

export declare class TextInputBubble extends Bubble 

Extends: Bubble

Constructors

Constructor

Modifiers

Description

(constructor)(workspace, anchor, ownerRect, owner)

Constructs a new instance of the TextInputBubble class

Properties

Property

Modifiers

Type

Description

anchor

protected

Coordinate

owner?

protected

(IHasBubble & IFocusableNode) | undefined

(Optional)

ownerRect?

protected

Rect | undefined

(Optional)

workspace

readonly

WorkspaceSvg

Methods

Method

Modifiers

Description

addLocationChangeListener(listener)

Adds a change listener to be notified when this bubble's location changes.

addSizeChangeListener(listener)

Adds a change listener to be notified when this bubble's size changes.

addTextChangeListener(listener)

Adds a change listener to be notified when this bubble's text changes.

getSize()

getText()

isEditable()

Returns whether or not the text in the bubble is editable.

moveDuringDrag(newLoc)

positionByRect(rect)

protected

setEditable(editable)

Sets whether or not the text in the bubble is editable.

setPositionRelativeToAnchor(left, top)

setSize(size, relayout)

Sets the size of this bubble, including the border.

setText(text)

Sets the text of this bubble. Calls change listeners.