We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 514678d commit 59e13e3Copy full SHA for 59e13e3
2 files changed
assets/js/application.js
@@ -787,7 +787,12 @@ var Graphviz = {
787
let vizInstance
788
[...document.querySelectorAll("pre[class=graphviz]")].forEach(async (x) => {
789
if (!vizInstance) vizInstance = await Viz.instance()
790
- const svg = vizInstance.renderSVGElement(x.innerText)
+ const options = {
791
+ graphAttributes: {
792
+ bgcolor: "transparent",
793
+ },
794
+ }
795
+ const svg = vizInstance.renderSVGElement(x.innerText, options)
796
x.parentNode.insertBefore(svg, x);
797
x.style.display = 'none'
798
});
assets/sass/layout.scss
@@ -317,6 +317,10 @@ p.center {
317
}
318
319
320
+svg.graphviz {
321
+ width: 100%;
322
+}
323
+
324
// Dropdowns
325
a.dropdown-trigger {
326
padding: 4px 5px;
0 commit comments