File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -485,17 +485,7 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
485
485
} ;
486
486
487
487
const dot = await ctx . client . sendRequest ( ra . viewCrateGraph , params ) ;
488
-
489
- const scripts = [
490
- { file : '/d3/dist/d3.min.js' } ,
491
- { file : '/@hpcc-js/wasm/dist/index.min.js' , worker : true } ,
492
- { file : '/d3-graphviz/build/d3-graphviz.min.js' } ,
493
- ] ;
494
-
495
- const scriptsHtml = scripts . map ( ( { file, worker } ) => {
496
- const uri = panel . webview . asWebviewUri ( vscode . Uri . joinPath ( nodeModulesPath , file ) ) ;
497
- return `<script type="${ worker ? "javascript/worker" : "text/javascript" } " src="${ uri } "></script>` ;
498
- } ) . join ( "\n" ) ;
488
+ const uri = panel . webview . asWebviewUri ( nodeModulesPath ) ;
499
489
500
490
const html = `
501
491
<!DOCTYPE html>
@@ -515,7 +505,9 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
515
505
</style>
516
506
</head>
517
507
<body>
518
- ${ scriptsHtml }
508
+ <script type="text/javascript" src="${ uri } /d3/dist/d3.min.js"></script>
509
+ <script type="javascript/worker" src="${ uri } /@hpcc-js/wasm/dist/index.min.js"></script>
510
+ <script type="text/javascript" src="${ uri } /d3-graphviz/build/d3-graphviz.min.js"></script>
519
511
<div id="graph"></div>
520
512
<script>
521
513
let graph = d3.select("#graph")
You can’t perform that action at this time.
0 commit comments