Skinparam svgLinkTarget not working for API

0 votes
asked Sep 28, 2016 by anonymous
This is a strange one.

I have specified the option "skinparam svgLinkTarget _parent" in my PUML file (class diagram). When I generate the SVG from the command-line (Homebrew on OS X version 8046), the SVG targets are correct. When I generate it through the API using SourceStringReader class (version 8046 specified in my pom.xml file), it keeps the default _top.

Any ideas?

1 Answer

0 votes
answered Sep 28, 2016 by plantuml (134,570 points)

Yes :-)  The svgLinkTarget parameter has been implemented quickly and badly.

If you are using SourceStringReader class, when calling generateImage(), you currently should pass a FileFormatOption argument.

And build this argument this way:

new FileFormatOption(FileFormat.PNG).withSvgLinkTarget("_parent");

We'll try to refactor our code so that this workaround is not need anymore.

Hope it helps!

commented Sep 28, 2016 by anonymous
Works perfectly! Thank you.
...