glint-diagram-download-button
Adds a button to download the diagram image as a .svg
file.
<glint-diagram-control-layout>
<glint-class-diagram #diagram
diagram [graph]="graph"/>
@if(diagram.svgElement) {
<glint-diagram-download-button control [svg]="diagram.svgElement" class="glint-diagram-control-after"/>
}
</glint-diagram-control-layout>
[svg]
: Reference to the SVG element of the diagram. Most diagram components expose ansvgElement
property..glint-diagram-control-after
: Css class that places the download button to the right of the control panel.
glint-diagram-control-layout
If you use the glint-diagram-control-layout
, the download button will be provided if the diagram contains an svg
element.
However, you can explicitly define the button to reconfigure it.