Hi,
In Graphviz, we have 3 important attributes for the SVG export :
These attributes are important if we want to add with javascript some interactivity to the diagram.
What are the possibilities in Plantuml today ? I checked a bit the documentation but I did not see anything linked to that topic.
If we focus on mindmap, the generated node is a rect followed by a text
for example in the mindmap diagram if we have : + Some Node
it will produce
<rect ...attributes></rect> // shape for the node
<text ...attributes >Some Node</text> // the text of the node
(it's the simplest case, if links are added then anchors will appear...)
I would love to have the ability to produce :
<rect id="myID" class="myClass" ...></rect> // shape for the node
<text ...>Some Node</text> // the text of the node
Today we can reference classname like so :
Class
+ Some Node<<myClass>>
- we could then add in the corresponding element this class name (<rect class="myClass" ...></rect>)
- Why the element rect instead of the element text ? I don't really care the important part is to have some infos that helps us to know where we are.
of course I understand the problem... for plantuml point of view <<myClass>> is used to apply the style defined by
<style>
.myClass{
}
</style>
and we could have FontSize and BackGroundColor inside it.
- FontSize will impact the text element,
- BackGroundColor will impact the rect element
so we indeed have a problem of consistency here...because "one plantuml statement" produces multiple svg elements... so I don't know how we could resolve that.
ID
+ Some Node<<#myID>> ( to keep things close to the web )
- we can then add in the corresponding element this id (<rect id="myID" ...></rect>)
Here the issue is why target rect element rather than the text element ?
Class and ID
+ Some Node<<#myID myClass>>
- we can then add in the corresponding element both (<rect id="myID" class="myClass" ...></rect>)
This is just a straightforward first draft to present the request
Thanks