mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
#901 Fixed the issue with multiple calls to bind the click functions. Also sanitized the tooltips so that no tags are allowed in them for (#847).
This commit is contained in:
@@ -497,10 +497,17 @@ const render = function (id, txt, cb, container) {
|
||||
svgCode = decodeEntities(svgCode)
|
||||
|
||||
if (typeof cb !== 'undefined') {
|
||||
cb(svgCode, flowDb.bindFunctions)
|
||||
cb(svgCode, ganttDb.bindFunctions)
|
||||
switch(graphType) {
|
||||
case 'flowchart':
|
||||
cb(svgCode, flowDb.bindFunctions)
|
||||
break;
|
||||
case 'gantt':
|
||||
cb(svgCode, ganttDb.bindFunctions)
|
||||
break;
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
logger.warn('CB = undefined!')
|
||||
logger.debug('CB = undefined!')
|
||||
}
|
||||
|
||||
const node = d3.select('#d' + id).node()
|
||||
|
Reference in New Issue
Block a user