new DiamondVerticalGroup(configs)
Parameters:
Name | Type | Description |
---|---|---|
configs |
Diamond~DiamondConfigs | GroupTemplate~GroupConfigs | 配置 |
Extends
Members
-
_layout
-
- Inherited From:
- Mixes In:
Properties:
Type Description Layout 布局对象
-
_linkStack
-
- Inherited From:
- Mixes In:
Properties:
Type Description InstanceStack 连线栈
-
_stack
-
- Inherited From:
- Mixes In:
Properties:
Type Description InstanceStack 对象栈
-
absolutePosition :Node~AbsolutePosition
-
Type:
- Inherited From:
-
anchor :Array.<number>
-
Type:
- Array.<number>
- Inherited From:
-
height :Number
-
内部矩形高
Type:
- Number
- Inherited From:
-
instances
-
- Inherited From:
- Mixes In:
Properties:
Type Description Array.<Node> 对象数组
-
links
-
- Inherited From:
- Mixes In:
Properties:
Type Description Array.<BaseLink> 连线数组
-
side :Number
-
两侧三角形的宽
Type:
- Number
- Inherited From:
-
width :Number
-
内部矩形宽
Type:
- Number
- Inherited From:
Methods
-
addToLinkStack(instance)
-
加入连线对象
Parameters:
Name Type Description instance
BaseLink 连线对象
- Inherited From:
- Mixes In:
-
addToStack(instance)
-
加入节点对象
Parameters:
Name Type Description instance
Node 节点对象
- Inherited From:
- Mixes In:
-
clone()
-
克隆当前节点.
- Inherited From:
Returns:
当前节点的副本
- Type
- Node
-
initLayout(configs)
-
初始化布局
Parameters:
Name Type Description configs
LayoutMixin~LayoutConfigs 配置
- Inherited From:
- Mixes In:
-
initStack(configs)
-
初始化对象栈
Parameters:
Name Type Description configs
JflowConfigs 配置
- Inherited From:
- Mixes In:
-
interateNodeStack()
-
循环当前栈中节点
- Inherited From:
- Mixes In:
Properties:
Name Type Description 循环访问栈中每个节点
stackIteratorCallback -
recalculate()
-
重新计算布局,相当于浏览器里面重排,并重算当前布局下的最小外接矩形
- Inherited From:
- Mixes In:
-
recalculateUp()
-
从当前层出发,向上层递归重排
- Inherited From:
- Mixes In:
-
reflow()
-
重新计算布局,相当于浏览器里面重排
- Inherited From:
- Mixes In:
-
removeFromLinkStack(target)
-
删除连线对象
Parameters:
Name Type Description target
Node 连线对象
- Inherited From:
- Mixes In:
-
removeFromStack(target)
-
删除节点对象
Parameters:
Name Type Description target
Node 节点对象
- Inherited From:
- Mixes In:
-
replaceFromStack(target, instance)
-
替换对象
Parameters:
Name Type Description target
Instance 被替换的对象
instance
Instance 替换对象
- Inherited From:
- Mixes In:
-
resetChildrenPosition()
-
重置当前栈中对象的位置
- Inherited From:
- Mixes In:
-
staticCheck(instance)
-
布局静态检查
Parameters:
Name Type Description instance
Instance 检查单元
- Inherited From:
- Mixes In:
Returns:
- 检查结果
- Type
- Boolean
Events
-
afterResolveMovingTarget
-
开始拖拽时,拖拽对象设置之前
Type: object
- Inherited From:
Properties:
-
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: