antvis/G6

重复渲染会导致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

屏幕截图或视频(可选)

Uploading 微信图片_20231107172914.png…

补充说明(可选)

No response


Hi @nuhour, Please star this repo if you find it useful! Thanks :star:! 你好 @nuhour。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!

posted by github-actions[bot] over 1 year ago

hi @nuhour, welcome!

posted by github-actions[bot] over 1 year ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests