Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable auto render #91

Closed
timelyportfolio opened this issue Jan 6, 2015 · 3 comments
Closed

disable auto render #91

timelyportfolio opened this issue Jan 6, 2015 · 3 comments

Comments

@timelyportfolio
Copy link

I see in these lines of code where auto render can be disabled. Would it be possible to handle this within the mermaid namespace as a config rather than global?

By the way, extremely well done, so well that we are attempting to wrap it in R as a htmlwidget. Hope to have more input and at least tests as we work through the process.

Thanks again.

@knsv
Copy link
Collaborator

knsv commented Jan 6, 2015

Hello!

Thanks for the kind words!

It is possible to turn off auto rendering. To do so, create a config object named mermaid_config with the property startOnLoad set to false.

Ex:

var mermaid_config = {
   startOnLoad: false
};

If I understand you correctly you want this to be with in the mermaid namespace something like:

mermaid.startOnLoad = false;

That makes sense. Think the config came to be before the mermaid namespace and was never moved.

@knsv
Copy link
Collaborator

knsv commented Jan 6, 2015

Cool with the widget! Hope this helps.

Added the option to disable auto rendering via the mermaid namespace as below. This is in master but not released yet.

mermaid.startOnLoad = false;

@timelyportfolio
Copy link
Author

Your interpretation is correct, and I hesitated to file issue since the startOnLoad looked temporary. The code is a little whacky with the widget binding/infrastructure, but here are the applicable lines for which the startOnLoad is important for me. This is to make the SVG quasi-"responsive" to fit the parent container, since widgets load in multiple contexts.

While I was typing, just noticed your response and change, thanks so much. Please let me know if I can help on any way with development or testing.

knsv added a commit that referenced this issue Jan 6, 2015
…as described in issue #91

Added optional ; as statement separator equal to newline for sequence diagrams (help for tidy users)
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
…nd_yarn/husky-4.3.8

Bump husky from 4.3.0 to 4.3.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants