mirror of
https://github.com/status-im/codimd.git
synced 2025-01-12 11:24:37 +00:00
Allow specifying option for graphviz
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
parent
24de5a54c9
commit
cfbae54ef8
@ -368,9 +368,10 @@ export function finishView (view) {
|
|||||||
graphvizs.each(function (key, value) {
|
graphvizs.each(function (key, value) {
|
||||||
try {
|
try {
|
||||||
var $value = $(value)
|
var $value = $(value)
|
||||||
|
const options = deserializeParamAttributeFromElement(value)
|
||||||
var $ele = $(value).parent().parent()
|
var $ele = $(value).parent().parent()
|
||||||
$value.unwrap()
|
$value.unwrap()
|
||||||
viz.renderString($value.text())
|
viz.renderString($value.text(), options)
|
||||||
.then(graphviz => {
|
.then(graphviz => {
|
||||||
if (!graphviz) throw Error('viz.js output empty graph')
|
if (!graphviz) throw Error('viz.js output empty graph')
|
||||||
$value.html(graphviz)
|
$value.html(graphviz)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user