MaterialXLab API
0.0.1
APIs For MaterialXLab Libraries
|
Class which will export a graph to Mermaid format. More...
Public Member Functions | |
constructor (graphDictionary, connections) | |
Constructor. | |
setOrientation (orientation) | |
Set the orientation of the graph. | |
setEmitCategory (emitCategory) | |
Set the emit the category versus the node name. | |
setEmitType (emitType) | |
Emit the type of each node in the graph. | |
sanitizeString (path) | |
Sanitize the a node path to be safe to use with Mermaid. | |
execute () | |
Build the graph. | |
write (filename) | |
Write the graph to a file. | |
getGraph (wrap=true) | |
Get the graph wrapped in a code block if desired. | |
export () | |
Class which will export a graph to Mermaid format.
Definition at line 471 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::constructor | ( | graphDictionary, | |
connections ) |
Constructor.
graphDictionary | Set of graph elements organized by node graph |
connections | Set of connections between graph elements |
Definition at line 479 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::execute | ( | ) |
Build the graph.
Scans the graph dictionary to create the list of nodes per graph and then scans the connections to create the list of connections between nodes. Specific shapes and colours are assigned for different node types.
Definition at line 537 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::export | ( | ) |
Definition at line 657 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::getGraph | ( | wrap = true | ) |
Get the graph wrapped in a code block if desired.
wrap | Wrap the graph in a Markdown code block |
Definition at line 648 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::sanitizeString | ( | path | ) |
Sanitize the a node path to be safe to use with Mermaid.
path | Original path |
Definition at line 520 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::setEmitCategory | ( | emitCategory | ) |
Set the emit the category versus the node name.
emitCategory |
Definition at line 502 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::setEmitType | ( | emitType | ) |
Emit the type of each node in the graph.
emitType |
Definition at line 511 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::setOrientation | ( | orientation | ) |
Set the orientation of the graph.
orientation |
Definition at line 493 of file JsMaterialXGraph.js.
MxMermaidGraphExporter::write | ( | filename | ) |
Write the graph to a file.
filename |
Definition at line 639 of file JsMaterialXGraph.js.