Skip to content

Commit

Permalink
Get graphviz working again
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Jan 11, 2023
1 parent 327e42d commit 446a8b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h1>Visualize a recursive function</h1>

</div>
<!-- GraphViz WASM -->
<script src="https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist/graphviz.umd.js"></script>
<!-- Python WASM -->
<script src="https://cdn.jsdelivr.net/pyodide/v0.19.0/full/pyodide.js"></script>
<!-- Form functionality-->
Expand Down Expand Up @@ -145,7 +145,7 @@ <h1>Visualize a recursive function</h1>
const functionCall = document.getElementById('function-call-input').value;
const dotGraph = pyodide.runPython(`visualize('''${functionDef}''', '''${functionCall}''')`);
document.getElementById("visualize-status").innerHTML = "Rendering call graph...";
hpccWasm.graphvizSync().then(graphviz => {
hpccWasm.Graphviz.load().then(graphviz => {
const div = document.getElementById("placeholder");
div.innerHTML = graphviz.layout(dotGraph, "svg", "dot");
new RecursiveTreeViz(div.querySelector('svg')).draw()
Expand Down

0 comments on commit 446a8b6

Please sign in to comment.