mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-07 16:19:38 +02:00
change argument from tooltip to functionArgs
This commit is contained in:
@@ -167,7 +167,11 @@ export const setCssClass = function(ids, className) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by parser when a tooltip is found, e.g. a clickable element.
|
||||||
|
* @param ids Comma separated list of ids
|
||||||
|
* @param tooltip Tooltip to add
|
||||||
|
*/
|
||||||
const setTooltip = function(ids, tooltip) {
|
const setTooltip = function(ids, tooltip) {
|
||||||
const config = configApi.getConfig();
|
const config = configApi.getConfig();
|
||||||
ids.split(',').forEach(function(id) {
|
ids.split(',').forEach(function(id) {
|
||||||
@@ -203,13 +207,13 @@ export const setLink = function(ids, linkStr) {
|
|||||||
*/
|
*/
|
||||||
export const setClickEvent = function(ids, functionName, functionArgs) {
|
export const setClickEvent = function(ids, functionName, functionArgs) {
|
||||||
ids.split(',').forEach(function(id) {
|
ids.split(',').forEach(function(id) {
|
||||||
setClickFunc(id, functionName, tooltip);
|
setClickFunc(id, functionName, functionArgs);
|
||||||
classes[id].haveCallback = true;
|
classes[id].haveCallback = true;
|
||||||
});
|
});
|
||||||
setCssClass(ids, 'clickable');
|
setCssClass(ids, 'clickable');
|
||||||
};
|
};
|
||||||
|
|
||||||
const setClickFunc = function(domId, functionName, tooltip) {
|
const setClickFunc = function(domId, functionName, functionArgs) {
|
||||||
const config = configApi.getConfig();
|
const config = configApi.getConfig();
|
||||||
let id = domId;
|
let id = domId;
|
||||||
let elemId = lookUpDomId(id);
|
let elemId = lookUpDomId(id);
|
||||||
|
Reference in New Issue
Block a user