new EdgeGroup()
连线分组
Methods
-
each(func, scope)
-
提供一个回调函数遍历此分组的所有连线
Parameters:
Name Type Argument Description func
function 遍历函数
scope
Object <optional>
函数域
Example
edgeGroup.each(function(edge) { console.log(edge); });
-
eachSiblingEdge(func, scope)
-
提供一个回调函数遍历相同起始和目标图元之间其它分组中的连线
Parameters:
Name Type Argument Description func
function 遍历函数
scope
Object <optional>
函数域
Example
edgeGroup.eachSiblingEdge(function(edge) { console.log(edge); });
-
get(index) → {ht.Edge}
-
根据索引获取分组中的连线
Parameters:
Name Type Description index
Number 索引
Returns:
- Type
- ht.Edge
-
getEdges() → {ht.List}
-
获取分组中所有连线
Returns:
- Type
- ht.List
-
getSiblings() → {ht.List}
-
获取相同起始和目标图元之间的其它分组
Returns:
- Type
- ht.List
-
indexOf(edge) → {Number}
-
获取参数连线在分组中的索引
Parameters:
Name Type Description edge
ht.Edge 连线
Returns:
- Type
- Number
-
size() → {Number}
-
获取分组中的连线数量
Returns:
- Type
- Number