mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-22 17:56:43 +02:00
#1050 Merge of PR
This commit is contained in:
@@ -45,8 +45,9 @@ const contentLoadedApi = function() {
|
|||||||
if (Array.isArray(graphObj.code)) {
|
if (Array.isArray(graphObj.code)) {
|
||||||
const numCodes = graphObj.code.length;
|
const numCodes = graphObj.code.length;
|
||||||
const divs = [];
|
const divs = [];
|
||||||
|
let div;
|
||||||
for (let i = 0; i < numCodes; i++) {
|
for (let i = 0; i < numCodes; i++) {
|
||||||
const div = document.createElement('div');
|
div = document.createElement('div');
|
||||||
div.id = 'block' + i;
|
div.id = 'block' + i;
|
||||||
div.className = 'mermaid';
|
div.className = 'mermaid';
|
||||||
// div.innerHTML = graphObj.code
|
// div.innerHTML = graphObj.code
|
||||||
@@ -82,10 +83,11 @@ const contentLoadedApi = function() {
|
|||||||
(svgCode, bindFunctions) => {
|
(svgCode, bindFunctions) => {
|
||||||
div.innerHTML = svgCode;
|
div.innerHTML = svgCode;
|
||||||
|
|
||||||
if (bindFunctions) bindFunctions(div);
|
if (bindFunctions) bindFunctions(div);
|
||||||
},
|
},
|
||||||
div
|
div
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user