- Issue created by @cosmicdreams
- πΊπΈUnited States swirt Florida
Good catch. Thank you for reporting this.
- First commit to issue fork.
- π¦π·Argentina tguerineau
In order to address the issue I made a commit.
Here's a brief overview of the changes:
1. Refactored Mermaid JS Integration: Instead of initializing Mermaid for each diagram element multiple times, the code has been optimized to ensure each .mermaid element is initialized only once. This change not only boosts performance but also prevents potential rendering anomalies.
2. Introduced jQuery's .once() Method: To achieve the above, I've incorporated the jQuery .once() method. This ensures that each .mermaid element is processed just a single time, avoiding redundant operations.
By implementing these changes, the Mermaid JS file now runs efficiently, ensuring diagrams are processed correctly.
Review the commit and provide feedback. If there are any concerns or further improvements to discuss, I'm open to suggestions.
- Status changed to Needs review
about 1 year ago 1:32pm 7 September 2023 - @tguerineau opened merge request.
-
swirt β
committed d5298d37 on 1.0.x authored by
tguerineau β
Issue #3352702: JS: Diagam use once to ensure mermaid doesn't init many...
-
swirt β
committed d5298d37 on 1.0.x authored by
tguerineau β
- Status changed to Fixed
about 1 year ago 1:18am 8 September 2023 - πΊπΈUnited States swirt Florida
Thank you for your contribution @tguerineau
I tested this out and all diagrams render appropriately. This will go out with release 1.0.11 Automatically closed - issue fixed for 2 weeks with no activity.