Skip to content

Commit

Permalink
Update for Mermaid 10 API
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Jul 2, 2024
1 parent d3b48b0 commit 5ab8bb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion funnel/assets/js/utils/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ async function addMermaidEmbed(container) {
idCount += 1;
} while ($(`#${idMarker}${idCount}`).length > 0);
}
mermaid.render(elemId, definition, (svg) => {
mermaid.render(elemId, definition).then(({ svg, bindFunctions }) => {
containerElem.html(svg);
containerElem.each(function () {
bindFunctions?.(this);
});
root.addClass('activated').removeClass('activating');
});
});
Expand Down

0 comments on commit 5ab8bb2

Please sign in to comment.