Skip to content

Invalid link representation #13

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

Open
dmitry-worker opened this issue Jan 17, 2020 · 6 comments
Open

Invalid link representation #13

dmitry-worker opened this issue Jan 17, 2020 · 6 comments

Comments

@dmitry-worker
Copy link

dmitry-worker commented Jan 17, 2020

nodes: [
        {
          id: "1",
          text: "A",
          link: ["-- yes -->", "-- no -->"],
          next: ["2", "3"],
          editable: true
        },
        { id: "2", text: "B" },
        { id: "3", text: "C"}
      ],

Expected: https://raw.githubusercontent.com/robin1liu/vue-mermaid/HEAD/img/links.jpg
Actual:

graph LR
1[A]-- yes -->,-- no -->2[B]
1[A]-- yes -->,-- no -->3[C]
2[B]
3[C]
@TE-ShinyaYamada
Copy link

I found a workaround. When defining a separate node, it can be realized.

nodes: [
        {
          id: "1",
          text: "A",
          link: ["-- yes -->"],
          next: ["2"],
          editable: true
        },
        {
          id: "1",
          text: "A",
          link: ["-- no -->"],
          next: ["3"],
          editable: true
        },
        { id: "2", text: "B" },
        { id: "3", text: "C"}
      ],

@ginger-tek
Copy link

ginger-tek commented Jun 1, 2020

But then why would the link attribute be an array if it can only have an length of 1? That doesn't make much sense to allude to multiple links via that attribute's data type but then not be able to render it as expected

@TE-ShinyaYamada
Copy link

Of course It is definitely a bug since readme.md shows a node with multiple links are allowed.
https://github.com/robin1liu/vue-mermaid#different-link-values-of-next

So, my solution is just a workaround.

@alberto-bottarini
Copy link

Any news about this bug?

@TE-ShinyaYamada
Copy link

I found a comment #11 (comment) mentioning that modifying vue-mermaid/package.json manually will resolve the bug.

@alberto-bottarini
Copy link

Thanks, but i will prefer your workaround

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

4 participants