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:
commit
16059112c4
@ -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",
|
||||
|
@ -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}\`);
|
||||
|
Loading…
Reference in New Issue
Block a user