blockly > bubbles > TextInputBubble

bubbles.TextInputBubble 类

用于显示可编辑文本的气泡。用户也可以调整其大小。由评论图标使用。

Signature:

export declare class TextInputBubble extends Bubble 

扩展气泡

构造函数

构造函数 修饰符 说明
(constructor)(workspace, anchor, ownerRect) 构造 TextInputBubble 类的新实例

属性

属性 修饰符 类型 说明
protected 坐标
ownerRect? protected Rect | 未定义 (可选)
工作区 readonly WorkspaceSvg

方法

方法 修饰符 说明
addLocationChangeListener(listener) 添加了更改监听器,以便在气泡的位置发生变化时收到通知。
addSizeChangeListener(listener) 添加了更改监听器,以便在气泡的大小发生变化时收到通知。
addTextChangeListener(listener) 添加一个更改监听器,以便在该气泡的文本发生变化时收到通知。
getSize()
getText()
isEditable() 返回气泡中文本是否可修改。
moveDuringDrag(newLoc)
positionByRect(rect) protected
setEditable(editable) 设置气泡中文本的可修改性。
setPositionRelativeToAnchor(left, top)
setSize(size, relayout) 设置此气泡的大小,包括边框。
setText(text) 设置此气泡的文本。调用更改监听器。