import { ForceAtlas2Layout } from '@antv/layout';
const data = {
nodes,
edges,
}
const layout = new ForceAtlas2Layout({
width,
height,
nodeSize: 60,
preventOverlap: true,
kr: 10,
barnesHut: true,
mode: 'linlog'
});
await layout.execute(data);
我在自己在webworker中这样使用ForceAtlas2Layout布局,但是计算出来的node节点位置有很多是重叠在一起的。规律是凡事节点的degree为1的都重叠在了一起。是为什么?
第二,我期望能够启用迭代模式来执行,但文档中对于如何使用迭代方式执行说的不够详尽,期望能出一个例子详细说明一下使用方式。