mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Remove render2 method
This commit is contained in:
parent
297fa7a069
commit
0d0cdd0542
@ -470,24 +470,6 @@ const render = function (id, txt, cb, container) {
|
|||||||
return svgCode
|
return svgCode
|
||||||
}
|
}
|
||||||
|
|
||||||
function render2 (id, text, cb, containerElement) {
|
|
||||||
try {
|
|
||||||
if (arguments.length === 1) {
|
|
||||||
text = id
|
|
||||||
id = 'mermaidId0'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof document === 'undefined') {
|
|
||||||
// Todo handle rendering serverside using phantomjs
|
|
||||||
} else {
|
|
||||||
// In browser
|
|
||||||
return render(id, text, cb, containerElement)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logger.error(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const setConf = function (cnf) {
|
const setConf = function (cnf) {
|
||||||
// Top level initially mermaid, gflow, sequenceDiagram and gantt
|
// Top level initially mermaid, gflow, sequenceDiagram and gantt
|
||||||
const lvl1Keys = Object.keys(cnf)
|
const lvl1Keys = Object.keys(cnf)
|
||||||
@ -523,7 +505,7 @@ function getConfig () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mermaidAPI = {
|
const mermaidAPI = {
|
||||||
render: render2,
|
render,
|
||||||
parse,
|
parse,
|
||||||
initialize,
|
initialize,
|
||||||
detectType: utils.detectType,
|
detectType: utils.detectType,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user