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 instance
BaseLink 连线对象
- Mixes In:
-
addToStack(instance)
-
加入节点对象
Parameters:
Name Type Description instance
Node 节点对象
- Mixes In:
-
initLayout(configs)
-
初始化布局
Parameters:
Name Type Description configs
LayoutMixin~LayoutConfigs 配置
- Mixes In:
-
initStack(configs)
-
初始化对象栈
Parameters:
Name Type Description configs
JflowConfigs 配置
- 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 target
Node 连线对象
- Mixes In:
-
removeFromStack(target)
-
删除节点对象
Parameters:
Name Type Description target
Node 节点对象
- Mixes In:
-
replaceFromStack(target, instance)
-
替换对象
Parameters:
Name Type Description target
Instance 被替换的对象
instance
Instance 替换对象
- Mixes In:
-
resetChildrenPosition()
-
重置当前栈中对象的位置
- Mixes In:
-
staticCheck(instance)
-
布局静态检查
Parameters:
Name Type Description instance
Instance 检查单元
- Mixes In:
Returns:
- 检查结果
- Type
- Boolean
Type Definitions
-
GroupConfigs
-
Group 配置
Type:
- Object
Properties:
Name Type Description width
number 设定宽度
minWidth
number 最小宽度
height
number 设定高度
padding
number 内边距
paddingTop
number 内上边距
paddingRight
number 内右边距
paddingBottom
number 内下边距
paddingLeft
number 内左边距
margin
number 外边距
marginTop
number 外上边距
marginRight
number 外右边距
marginBottom
number 外下边距
marginLeft
number 外左边距
lock
boolean 布局锁定状态 默认 true