Allow specifying option for graphviz

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
Yukai Huang 2020-08-13 17:46:42 +08:00
parent 24de5a54c9
commit cfbae54ef8
No known key found for this signature in database
GPG Key ID: A76CBD50B22052C0
1 changed files with 2 additions and 1 deletions

View File

@ -368,9 +368,10 @@ export function finishView (view) {
graphvizs.each(function (key, value) {
try {
var $value = $(value)
const options = deserializeParamAttributeFromElement(value)
var $ele = $(value).parent().parent()
$value.unwrap()
viz.renderString($value.text())
viz.renderString($value.text(), options)
.then(graphviz => {
if (!graphviz) throw Error('viz.js output empty graph')
$value.html(graphviz)