mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
Merge pull request #4562 from lishid/patch-3
Fix flowchart tooltip typing bug
This commit is contained in:
@@ -342,7 +342,10 @@ export const setLink = function (ids, linkStr, target) {
|
|||||||
setClass(ids, 'clickable');
|
setClass(ids, 'clickable');
|
||||||
};
|
};
|
||||||
export const getTooltip = function (id) {
|
export const getTooltip = function (id) {
|
||||||
return tooltips[id];
|
if (tooltips.hasOwnProperty(id)) {
|
||||||
|
return tooltips[id];
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -443,7 +446,7 @@ export const clear = function (ver = 'gen-1') {
|
|||||||
subGraphs = [];
|
subGraphs = [];
|
||||||
subGraphLookup = {};
|
subGraphLookup = {};
|
||||||
subCount = 0;
|
subCount = 0;
|
||||||
tooltips = [];
|
tooltips = {};
|
||||||
firstGraphFlag = true;
|
firstGraphFlag = true;
|
||||||
version = ver;
|
version = ver;
|
||||||
commonClear();
|
commonClear();
|
||||||
|
Reference in New Issue
Block a user