antvis/G6



The issue has been closed
重复渲染会导致node和combo间距无限加大 #5120
nuhour posted onGitHub
问题描述
首次渲染数据符合预期(图片一直上传失败就不贴了) 后面如果重复clear后再render或者直接changeData都会让combo和combo内的node间距加大,导致整个canvas无限加大 layout的配置为:
layout: {
type: 'comboForce',
nodeSpacing: 10,
comboSpacing: 80,
preventOverlap: true,
preventComboOverlap: true,
nodeSize: [70, 25],
nodeCollideStrength: 0.6,
comboCollideStrength: 0.7
}
如果去掉后面五行方重叠相关的配置,问题会消失但node和combo会全部叠在中心
重现链接
none
重现步骤
1.渲染数据: render(data); 2.重复渲染:clear & render 或者changeData 3.从第二次渲染开始combo和node之间的距离无限累加
预期行为
我希望重复渲染时layout以及combo和node间距能跟初次的保持一致,但看到的是不一致且累加的数据
平台
- 操作系统: Windows
- 网页浏览器: Google Chrome
- G6 版本: 4.3.11
屏幕截图或视频(可选)
补充说明(可选)
No response