File tree 1 file changed +6
-1
lines changed
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 {
667
667
<script type="text/javascript" src="${ uri } /d3-graphviz/build/d3-graphviz.min.js"></script>
668
668
<div id="graph"></div>
669
669
<script>
670
+ let dot = \`${ dot } \`;
670
671
let graph = d3.select("#graph")
671
672
.graphviz({ useWorker: false, useSharedWorker: false })
672
673
.fit(true)
673
674
.zoomScaleExtent([0.1, Infinity])
674
- .renderDot(\` ${ dot } \` );
675
+ .renderDot(dot);
675
676
676
677
d3.select(window).on("click", (event) => {
677
678
if (event.ctrlKey) {
678
679
graph.resetZoom(d3.transition().duration(100));
679
680
}
680
681
});
682
+ d3.select(window).on("copy", (event) => {
683
+ event.clipboardData.setData("text/plain", dot);
684
+ event.preventDefault();
685
+ });
681
686
</script>
682
687
</body>
683
688
` ;
You can’t perform that action at this time.
0 commit comments