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

Good example of interactivity with mermaidAPI #514

Closed
maxMidius opened this issue Apr 11, 2017 · 3 comments
Closed

Good example of interactivity with mermaidAPI #514

maxMidius opened this issue Apr 11, 2017 · 3 comments

Comments

@maxMidius
Copy link

The documentation which describes how to create links + tooltips is not a complete example.
Furthermore if mermaidAPI is the preferred approach going forward - then it makes sense to provide a concise yet complete working example without any extra clutter.

@maxMidius
Copy link
Author

I would like to add that - I have gone through the dist/test/examples and there is only one example with interactivity but that one is using the deprecated mermaid.js. Where as the mermaid markup code is Ok - the javascript functions for rendering svg and attaching callbacks (bindings) is confusing. For example what is the complete signature of mermaidAPI.render( "graphDiv", graphDef, insertSvg, element) - this needs proper explanation - for example is element derivable from "graphDiv" ??

@tylerlong
Copy link
Collaborator

Furthermore if mermaidAPI is the preferred approach going forward

Where do you get this information?

I am doing some investigation. I think mermaidAPI.js is for Node.js while mermaid.js is for browser. With the help of webpack, you can also use mermaidAPI.js for browser of course.

I am going to submit a huge PR soon. I have migrated the mermaid projectd to use webpack.

@tylerlong
Copy link
Collaborator

Here is an example using mermaidAPI: https://github.com/knsv/mermaid/blob/master/dist/demo/index.js

It's not "good" since it's simple. But it gives you an starting point to continue your work.

Closing it for now. Feel free to reopen or create a new issue.

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](cypress-io/cypress@v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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