Fixed issue which only passed the first char of functionargs to the function by splitting the functionargs by commas

This commit is contained in:
abzicht 2019-03-09 20:07:51 +01:00
parent 0c66e1b5b9
commit 10057217cb

View File

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