From aff69e583e35d3ae8e0ad6618ccbb9af459dbfb7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 27 Nov 2023 23:10:36 +0530 Subject: [PATCH] chore: Fix bindFunctions type --- packages/mermaid/src/diagrams/flowchart/flowDb.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index 814a1d4313..ebef6d2407 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -32,7 +32,7 @@ let direction: string; let version: string; // As in graph // Functions to be run after graph rendering -let funs: ((element: HTMLElement) => void)[] = []; +let funs: ((element: Element) => void)[] = []; const sanitizeText = (txt: string) => common.sanitizeText(txt, config); @@ -362,7 +362,7 @@ export const setClickEvent = function (ids: string, functionName: string, functi setClass(ids, 'clickable'); }; -export const bindFunctions = function (element: HTMLElement) { +export const bindFunctions = function (element: Element) { funs.forEach(function (fun) { fun(element); }); @@ -394,7 +394,7 @@ export const getClasses = function () { return classes; }; -const setupToolTips = function (element: HTMLElement) { +const setupToolTips = function (element: Element) { let tooltipElem = select('.mermaidTooltip'); // @ts-ignore TODO: fix this if ((tooltipElem._groups || tooltipElem)[0][0] === null) {