fix: Fix view crate graph being broken due to webworker usage
This commit is contained in:
parent
7501d3b721
commit
7a6d5c680c
@ -44,7 +44,8 @@
|
|||||||
"anser": "^2.1.1",
|
"anser": "^2.1.1",
|
||||||
"d3": "^7.6.1",
|
"d3": "^7.6.1",
|
||||||
"d3-graphviz": "^5.0.2",
|
"d3-graphviz": "^5.0.2",
|
||||||
"vscode-languageclient": "^8.0.2"
|
"vscode-languageclient": "^8.0.2",
|
||||||
|
"@hpcc-js/wasm": "2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "~16.11.7",
|
"@types/node": "~16.11.7",
|
||||||
|
@ -663,12 +663,12 @@ function crateGraph(ctx: CtxInit, full: boolean): Cmd {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" src="${uri}/d3/dist/d3.min.js"></script>
|
<script type="text/javascript" src="${uri}/d3/dist/d3.min.js"></script>
|
||||||
<script type="text/javascript" src="${uri}/@hpcc-js/wasm/dist/index.min.js"></script>
|
<script type="text/javascript" src="${uri}/@hpcc-js/wasm/dist/graphviz.umd.js"></script>
|
||||||
<script type="text/javascript" src="${uri}/d3-graphviz/build/d3-graphviz.min.js"></script>
|
<script type="text/javascript" src="${uri}/d3-graphviz/build/d3-graphviz.min.js"></script>
|
||||||
<div id="graph"></div>
|
<div id="graph"></div>
|
||||||
<script>
|
<script>
|
||||||
let graph = d3.select("#graph")
|
let graph = d3.select("#graph")
|
||||||
.graphviz()
|
.graphviz({ useWorker: false, useSharedWorker: false })
|
||||||
.fit(true)
|
.fit(true)
|
||||||
.zoomScaleExtent([0.1, Infinity])
|
.zoomScaleExtent([0.1, Infinity])
|
||||||
.renderDot(\`${dot}\`);
|
.renderDot(\`${dot}\`);
|
||||||
|
Loading…
Reference in New Issue
Block a user