mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
#731 Issue with clicks in flowcharts. Replacing d3 with document.querySelect and addEventListener
This commit is contained in:
parent
b9ad9ba674
commit
c25a3cf1c1
@ -195,11 +195,11 @@ const setClickFun = function (id, functionName) {
|
||||
}
|
||||
if (typeof vertices[id] !== 'undefined') {
|
||||
funs.push(function (element) {
|
||||
const elem = d3.select(element).select(`[id="${id}"]`)
|
||||
const elem = document.querySelector(`[id="${id}"]`)
|
||||
if (elem !== null) {
|
||||
elem.on('click', function () {
|
||||
window[functionName](id)
|
||||
})
|
||||
elem.addEventListener("click", function(){
|
||||
window[functionName](id);
|
||||
}, false);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user