mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Fixed issue which only passed the first char of functionargs to the function by splitting the functionargs by commas
This commit is contained in:
parent
0c66e1b5b9
commit
10057217cb
@ -406,6 +406,7 @@ export const setClass = function (ids, className) {
|
||||
}
|
||||
|
||||
const setClickFun = function (id, functionName, functionArgs) {
|
||||
functionArgs = functionArgs.split(',')
|
||||
if (typeof functionName === 'undefined') {
|
||||
return
|
||||
}
|
||||
@ -415,7 +416,6 @@ const setClickFun = function (id, functionName, functionArgs) {
|
||||
const elem = d3.select(element).select(`[id="${id}"]`)
|
||||
if (elem !== null) {
|
||||
elem.on('click', function () {
|
||||
console.log('test')
|
||||
window[functionName](id, ...functionArgs)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user