antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

An error is reported when you use WorkEnable #6529

WangHanZ posted onGitHub

Describe the bug / 问题描述

layout failed DOMException: Failed to execute 'postMessage' on 'Worker': function () { } could not be cloned. at LayoutController.runWebworker (webpack-internal:///./node_modules/@antv/g6-pc/es/graph/controller/layout.js:500:14) at eval (webpack-internal:///./node_modules/@antv/g6-pc/es/graph/controller/layout.js:455:22)

将layout.min.js放在了dcn地址也可以访问 到这个layout.min.js文件, this.topoGraph.data({ nodes: obj.nodes, edges: obj.edges }) this.topoGraph.updateLayout({ type: 'force2', clustering: true, animate: false, nodeClusterBy: 'comboId', linkDistance: 20, // 可选,边长 nodeStrength: 60, // 可选 nodeSize: 10, edgeStrength: 15, workerEnabled: true, workerScriptURL: ${window.location.origin}/layout.min.js,

        onLayoutEnd: () => { // 可选
          this.topoGraph.fitCenter()
        }
      })
      this.topoGraph.render()

但是执行得时候汇报这个错误

No response

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

No response

G6 Version / G6 版本

4.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests