new GroupTemplate(configs)
Parameters:
| Name | Type | Description |
|---|---|---|
configs |
GroupTemplate~GroupConfigs | 组配置 |
- Mixes In:
Members
-
_layout
-
- Mixes In:
Properties:
Type Description Layout 布局对象
-
_linkStack
-
- Mixes In:
Properties:
Type Description InstanceStack 连线栈
-
_stack
-
- Mixes In:
Properties:
Type Description InstanceStack 对象栈
-
instances
-
- Mixes In:
Properties:
Type Description Array.<Node> 对象数组
-
links
-
- Mixes In:
Properties:
Type Description Array.<BaseLink> 连线数组
Methods
-
addToLinkStack(instance)
-
加入连线对象
Parameters:
Name Type Description instanceBaseLink 连线对象
- Mixes In:
-
addToStack(instance)
-
加入节点对象
Parameters:
Name Type Description instanceNode 节点对象
- Mixes In:
-
initLayout(configs)
-
初始化布局
Parameters:
Name Type Description configsLayoutMixin~LayoutConfigs 配置
- Mixes In:
-
initStack(configs)
-
初始化对象栈
Parameters:
Name Type Description configsJflowConfigs 配置
- Mixes In:
-
interateNodeStack()
-
循环当前栈中节点
- Mixes In:
Properties:
Name Type Description 循环访问栈中每个节点stackIteratorCallback -
recalculate()
-
重新计算布局,相当于浏览器里面重排,并重算当前布局下的最小外接矩形
- Mixes In:
-
recalculateUp()
-
从当前层出发,向上层递归重排
- Mixes In:
-
reflow()
-
重新计算布局,相当于浏览器里面重排
- Mixes In:
-
removeFromLinkStack(target)
-
删除连线对象
Parameters:
Name Type Description targetNode 连线对象
- Mixes In:
-
removeFromStack(target)
-
删除节点对象
Parameters:
Name Type Description targetNode 节点对象
- Mixes In:
-
replaceFromStack(target, instance)
-
替换对象
Parameters:
Name Type Description targetInstance 被替换的对象
instanceInstance 替换对象
- Mixes In:
-
resetChildrenPosition()
-
重置当前栈中对象的位置
- Mixes In:
-
staticCheck(instance)
-
布局静态检查
Parameters:
Name Type Description instanceInstance 检查单元
- Mixes In:
Returns:
- 检查结果
- Type
- Boolean
Type Definitions
-
GroupConfigs
-
Group 配置
Type:
- Object
Properties:
Name Type Description widthnumber 设定宽度
minWidthnumber 最小宽度
heightnumber 设定高度
paddingnumber 内边距
paddingTopnumber 内上边距
paddingRightnumber 内右边距
paddingBottomnumber 内下边距
paddingLeftnumber 内左边距
marginnumber 外边距
marginTopnumber 外上边距
marginRightnumber 外右边距
marginBottomnumber 外下边距
marginLeftnumber 外左边距
lockboolean 布局锁定状态 默认 true