#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:
knsv
2019-08-11 03:26:44 -07:00
parent a6f21c2b91
commit 7b335fb62e
5 changed files with 41 additions and 10 deletions

View File

@@ -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()