mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 04:38:55 +08:00
feat: layout for combo. feat: nonoverlap for combo layout in first stage.
This commit is contained in:
parent
e06278f7c6
commit
a079ebaad3
@ -989,29 +989,6 @@ export default class Graph extends EventEmitter implements IGraph {
|
||||
self.addCombos(combos);
|
||||
}
|
||||
|
||||
if (!this.get('groupByTypes')) {
|
||||
if (combos) {
|
||||
this.sortCombos(data);
|
||||
} else {
|
||||
// 为提升性能,选择数量少的进行操作
|
||||
if (data.nodes && data.edges && data.nodes.length < data.edges.length) {
|
||||
const nodesArr = this.getNodes();
|
||||
|
||||
// 遍历节点实例,将所有节点提前。
|
||||
nodesArr.forEach(node => {
|
||||
node.toFront();
|
||||
});
|
||||
} else {
|
||||
const edgesArr = this.getEdges();
|
||||
|
||||
// 遍历节点实例,将所有节点提前。
|
||||
edgesArr.forEach(edge => {
|
||||
edge.toBack();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// layout
|
||||
const layoutController = self.get('layoutController');
|
||||
if (!layoutController.layout(success)) {
|
||||
|
Loading…
Reference in New Issue
Block a user