UIElement
new UIElement(data)
- Source:
Parameters:
| Name |
Type |
Description |
data |
Object
|
预设元素数据
|
Members
connected :boolean
- Source:
Type:
height :number
- Source:
Type:
name :string
- Source:
Type:
opacity :number
- Source:
Type:
pointerEvents :boolean
- Source:
Type:
presetId :string
- Source:
Type:
visible :boolean
- Source:
Type:
width :number
- Source:
Type:
Methods
appendChild(element)
- Source:
Parameters:
appendChildren(elements)
- Source:
Parameters:
calculatePosition()
- Source:
callEvent(type, bubbleopt) → {EventHandler|undefined}
- Source:
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
type |
string
|
|
|
元素事件类型
|
bubble |
boolean
|
<optional>
|
false
|
是否传递事件
|
connectChildren()
- Source:
contains(element) → {boolean}
- Source:
Parameters:
destroyChildren()
- Source:
disconnectChildren()
- Source:
emit(type, bubbleopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
type |
string
|
|
|
元素事件类型
|
bubble |
boolean
|
<optional>
|
false
|
是否传递事件
|
insertBefore(element, destination)
- Source:
Parameters:
isPointIn(x, y) → {boolean}
- Source:
Parameters:
| Name |
Type |
Description |
x |
number
|
屏幕X
|
y |
number
|
屏幕Y
|
isVisible() → {boolean}
- Source:
move(transformProps, easingIdopt, durationopt)
- Source:
Parameters:
| Name |
Type |
Attributes |
Description |
transformProps |
Object
|
|
元素变换属性选项
|
easingId |
string
|
<optional>
|
过渡曲线ID
|
duration |
number
|
<optional>
|
持续时间(毫秒)
|
moveToIndex(pos)
- Source:
Parameters:
| Name |
Type |
Description |
pos |
number
|
目标索引位置
|
query(key, value) → {UIElement|undefined}
- Source:
Parameters:
| Name |
Type |
Description |
key |
string
|
属性键
|
value |
any
|
属性值
|
set(transformProps)
- Source:
Parameters:
| Name |
Type |
Description |
transformProps |
Object
|
元素变换属性选项
|