File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -667,17 +667,22 @@ function crateGraph(ctx: CtxInit, full: boolean): Cmd {
667667 <script type="text/javascript" src="${ uri } /d3-graphviz/build/d3-graphviz.min.js"></script>
668668 <div id="graph"></div>
669669 <script>
670+ let dot = \`${ dot } \`;
670671 let graph = d3.select("#graph")
671672 .graphviz({ useWorker: false, useSharedWorker: false })
672673 .fit(true)
673674 .zoomScaleExtent([0.1, Infinity])
674- .renderDot(\` ${ dot } \` );
675+ .renderDot(dot);
675676
676677 d3.select(window).on("click", (event) => {
677678 if (event.ctrlKey) {
678679 graph.resetZoom(d3.transition().duration(100));
679680 }
680681 });
682+ d3.select(window).on("copy", (event) => {
683+ event.clipboardData.setData("text/plain", dot);
684+ event.preventDefault();
685+ });
681686 </script>
682687 </body>
683688 ` ;
You can’t perform that action at this time.
0 commit comments