please provide an ability to specify path (link) ids in the svg from the puml code

0 votes
asked Nov 13, 2023 in Wanted features by boshka (3,940 points)
edited Nov 13, 2023 by boshka

Hello,

Please have a look at the following SVG, generated by plantuml:

code:

https://www.plantuml.com/plantuml/umla/SoWkIImgAStDuKhEpot8pqlDAr58H68dSINgsYLPAPIa5fSe629pZBWSKlDIW3e1

svg:

https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuU9ApiyjoCzBpIjHI4HY9t4bwjebMIcKf1QNA1WYSuou75BpKe1Q0G00

The link elements in the svg are generated as the following groups <g>:

<g xmlns="http://www.w3.org/2000/svg" id="link_a_b"><path d="M55.0076,30 C76.2611,30 101.175,30 122.784,30 " fill="none" id="a-to-b" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="128.784,30,119.784,26,123.784,30,119.784,34,128.784,30" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="37" x="73.5" y="23.0669">test 1</text></g>

<g xmlns="http://www.w3.org/2000/svg" id="link_a_b"><path d="M55.353,43.9545 C60.8283,46.4551 66.7301,48.6822 72.5,50 C89.3982,53.8595 94.5841,53.7813 111.5,50 C117.23,48.7192 117.6103,49.0004 123.0863,46.5824 " fill="none" id="a-to-b-1" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="128.575,44.1587,118.7262,44.135,124.0011,46.1784,121.9577,51.4533,128.575,44.1587" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="37" x="73.5" y="46.0669">test 2</text></g>

Question:

Is there a way to specify own path id from the puml code (i.e. for the ids marked with bold above)? If not, can this capability be provided?

Suggested way could be:

a) simple case:

a-[id:myid1]->b: test 1

b) 2 colored arrows used for the link and each uses own custom id:

a-[#red,id:myid1;#green,id:myid2]->b: test 1

Thank you!


PS: a side question (this looks like a bug): plantuml generates duplicated group ids (link_a_b) as can be seen above. Probably this should be fixed to something like:

link_a_b,

link_a_b_1,

etc.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...