G6 icon indicating copy to clipboard operation
G6 copied to clipboard

[Bug]: Force layout will report an error when enableWorker is enabled

Open yvonneyx opened this issue 10 months ago • 4 comments

Describe the bug / 问题描述

在官网示例中尝试 WebWorker 加速 force 布局计算,效果不符合预期

开启前:

Image

开启后

Image

Reproduction link / 复现链接

https://g6.antv.antgroup.com/examples/layout/force-directed/#force

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 5.x

OS / 操作系统

  • [x] macOS
  • [ ] Windows
  • [ ] Linux
  • [ ] Others / 其他

Browser / 浏览器

  • [x] Chrome
  • [ ] Edge
  • [ ] Firefox
  • [ ] Safari (Limited support / 有限支持)
  • [ ] IE (Nonsupport / 不支持)
  • [ ] Others / 其他

yvonneyx avatar Feb 28 '25 08:02 yvonneyx

目前没有找到与您描述的问题完全相同的已解决问题。您提到的问题已经在 Issue #6812 中被报告。为了进一步解决此问题,您可以在该问题下提供更多信息或关注该问题的更新。

如果您有其他问题或需要更多帮助,请随时告诉我。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

petercat-assistant[bot] avatar Feb 28 '25 08:02 petercat-assistant[bot]

我在使用中也遇到enableWorker报错问题,我是想做布局切换,当我要切换的布局中设置了enableWorker: true的时候,就会报错,报错信息我已经上传了 我的版本信息: "@antv/g6": "^5.0.39"

我切换布局的代码跟官网提供的示例几乎一样

Image

jingyinzhou avatar Mar 05 '25 08:03 jingyinzhou

我在使用中也遇到enableWorker报错问题,我是想做布局切换,当我要切换的布局中设置了enableWorker: true的时候,就会报错,报错信息我已经上传了 我的版本信息: "@antv/g6": "^5.0.39"

我切换布局的代码跟官网提供的示例几乎一样

Image

你的这个数据是不是响应式的,worker不能传递响应式数据

alaAicy avatar Sep 16 '25 06:09 alaAicy

我也遇到了一样的布局问题,请问解决了吗

alaAicy avatar Sep 16 '25 06:09 alaAicy