Extends
Members
-
absolutePosition :Node~AbsolutePosition
-
Type:
- Inherited From:
-
anchor :Array.<number>
-
Type:
- Array.<number>
- Inherited From:
-
border :Rectangle~borders
-
边框设置,优先级高于 borderWidth,borderColor
Type:
- Inherited From:
-
borderRadius :Number
-
圆角矩形半径
Type:
- Number
- Inherited From:
-
content :String
-
内容
Type:
- String
-
editable :Boolean
-
是否可编辑
Type:
- Boolean
-
fontFamily :String
-
字体
Type:
- String
-
fontSize :String
-
字号
Type:
- String
-
fontWeight :String
-
字体
Type:
- String
-
height :Number
-
高
Type:
- Number
- Inherited From:
- Overrides:
-
indent :Number
-
缩进
Type:
- Number
-
lineHeight :Number
-
行高
Type:
- Number
-
minWidth :number
-
最小宽度
Type:
- number
-
textAlign :String
-
文字对齐方式
Type:
- String
-
textBaseline :String
-
文字基线方式
Type:
- String
-
textColor :String
-
字体颜色
Type:
- String
-
width :Number
-
宽
Type:
- Number
- Inherited From:
- Overrides:
Methods
-
_makeEditable()
-
编辑态
-
clone()
-
克隆当前节点.
- Inherited From:
Returns:
当前节点的副本
- Type
- Node
Type Definitions
-
TextConfigs
-
文字单元 配置
Type:
Properties:
Name Type Description fontFamilyString 字体
fontSizeNumber 字号
contentString 内容
textColorString 字体颜色
textAlignTEXT_ALIGN 文字对齐方式
backgroundColorString 背景颜色
lineHeightnumber 行高
indentnumber 缩进
editableBoolean 是否可编辑
minWidthnumber 最小宽度
placeholderstring 占位文字
emptyWhenInputBoolean 输入状态时是否清空input框
Events
-
afterResolveMovingTarget
-
开始拖拽时,拖拽对象设置之前
Type: object
- Inherited From:
Properties:
-
change
-
文字改变事件
Type: object
Properties:
Name Type Description targetText 当前文字对象
oldValString 原始文字
valString 当前文字
-
drop
-
丢在节点上事件
Type: object
-
instancemousemove
-
instance mousemove 原生事件,仅在无拖拽时触发
Type: object
- Inherited From:
Properties:
-
instancePressStart
-
开始拖动对象事件(就是目标对象的拖动事件,事件支持冒泡)
Type: object
- Inherited From:
Properties:
-
link
-
canvas mousemove 原生事件
Type: object
-
pressEnd
-
拖动后放置到 Instance 上的事件,由被拖动到的对象触发
Type: object
-
pressStart
-
开始拖动组的事件(特指lock的顶层组)
Type: object
- Inherited From:
Properties: