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

Link styles and node links #7

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

biscofil
Copy link

@biscofil biscofil commented Jul 29, 2021

Nodes can have links.
Links can now have individual styles.

The old "style" attribute of Link has been renamed to "type" as in the official documentation https://mermaid-js.github.io/mermaid/#/flowchart?id=links-between-nodes .

The style can be added though a parameter of the constructor.

Example:

$subGraph1
    ->addNode($nodeA = new Node('A', 'AAAA', Node::SQUARE, "https://mermaid-js.github.io/"))
    ->addNode($nodeB = new Node('B', 'BBBB', Node::ROUND))
    ->addLink(new Link($nodeA, $nodeB, 'A dec char:♥', Link::ARROW, 'stroke:blue,stroke-width:4px'));

Result:

Screenshot from 2021-07-29 14-58-58

@biscofil biscofil changed the title Link styles Link styles and node links Jul 29, 2021
@SmetDenis
Copy link
Member

SmetDenis commented Jul 29, 2021

Hi @biscofil

Thank you very much for your PR. Your change looks helpful.

Unfortunately, I see two issues.

Can you leave only the changes that are relevant to your fix and check changes via GH Actions?

Thank you!

@biscofil biscofil marked this pull request as draft July 30, 2021 18:45
@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants