Auto merge of #14560 - Veykril:view-crate-graph, r=Veykril

fix: Fix view crate graph being broken due to webworker usage

Fixes https://github.com/rust-lang/rust-analyzer/issues/14457
This commit is contained in:
bors 2023-04-13 15:50:01 +00:00
commit 16059112c4
2 changed files with 4 additions and 3 deletions

View File

@ -44,7 +44,8 @@
"anser": "^2.1.1",
"d3": "^7.6.1",
"d3-graphviz": "^5.0.2",
"vscode-languageclient": "^8.0.2"
"vscode-languageclient": "^8.0.2",
"@hpcc-js/wasm": "2.5.0"
},
"devDependencies": {
"@types/node": "~16.11.7",

View File

@ -663,12 +663,12 @@ function crateGraph(ctx: CtxInit, full: boolean): Cmd {
</head>
<body>
<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>
<div id="graph"></div>
<script>
let graph = d3.select("#graph")
.graphviz()
.graphviz({ useWorker: false, useSharedWorker: false })
.fit(true)
.zoomScaleExtent([0.1, Infinity])
.renderDot(\`${dot}\`);