-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
问题描述
基于@antv/hierarchy去计算脑图节点,如果脑图节点数量过多按招下面去循环更新节点位置,会导致更新时间太长,是否有批量更新节点位置信息的接口或者其他方案
const node = graph.getCellById(data.id);
node.setProp({
data: {
...node.getData(), // 保留旧数据
width: data.width,
height: data.height,
children: data.children,
},
size: { width: data.width, height: data.height },
position: { x: hierarchyItem.x, y: hierarchyItem.y },
});
重现链接
没有
重现步骤
基于@antv/hierarchy去计算脑图节点,如果脑图节点数量过多按招下面去循环更新节点位置,会导致更新时间太长,是否有批量更新节点位置信息的接口或者其他方案
const node = graph.getCellById(data.id);
node.setProp({
data: {
...node.getData(), // 保留旧数据
width: data.width,
height: data.height,
children: data.children,
},
size: { width: data.width, height: data.height },
position: { x: hierarchyItem.x, y: hierarchyItem.y },
});
预期行为
有批量更新节点位置信息的接口或者其他解决方案
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox ...]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response