Changes to the svg-file in recent versions of PlantUMl.

0 votes
asked Jul 13 in Question / help by poi (1,000 points)
retagged Sep 10 by poi

Background: I share my program, m2uml, at the Matlab File Exchange. m2uml creates a PlantUML class diagram script based on MATLAB source code. PlantUML takes the script and outputs an svg-file. A MATLAB internal viewer displays the class diagram. The diagram features both MATLAB specific hyper-links and tooltips. I use the triple bracket syntax, "[[[". This has worked well since hyperlinks was introduced in PlantUML. The MATLAB internal viewer correctly displays the PlantUML version 1.2018.09 svg-files. Both the hyperlinks and the tooltips works well. However, with PlantUML version 1.2019.07 the hyper-links "are gone". The pointer doesn't turn into a hand and there is no visible response to left-clicking. The svg-files generated by the two versions, 1.2018.09 and 1.2019.07, reveal differences when displayed in a text editor.

I assume that my problem is caused by limitations of the MATLAB internal viewer.

Questions: Is it possible to download older PlantUML versions from the PlantUML website? I have asked users to download from your website. If not, I assume I can describe the reason and attach plantuml.1.2018.09.jar to my m2uml.  

6 Answers

+1 vote
answered Sep 17 by plantuml (208,820 points)
selected Oct 16 by poi
 
Best answer
It seems that "href" is not the right way to use link in <a> for links from SVG.
So now we are using "xlink:href"

Old way:
<a href="matlab:matlab.desktop.editor.openAndGoToFunction('H:\m\PiaUnit\IDE_tools_test\mfiles4m2uml\HyperLinkIssue.m','single_method');" target="_top" xlink:actuate="onRequest" xlink:show="new" xlink:title="H1-line of single_method" xlink:type="simple">

New way:
<a target="_top" xlink:actuate="onRequest" xlink:href="matlab:matlab.desktop.editor.openAndGoToFunction('H:\m\PiaUnit\IDE_tools_test\mfiles4m2uml\HyperLinkIssue.m','single_method');" xlink:show="new" xlink:title="H1-line of single_method" xlink:type="simple">

I am wondering if we are not going to use both (that is duplicate "href" and "xlink:href") in next releases.
0 votes
answered Jul 13 by plantuml (208,820 points)

It's possible that some changes occurs in the way that SVG files are generated.

However, I think we could fix it.

So to help us, it would be nice if you would provide:

  • A simple .puml file with the tripple bracket syntax [[[
  • The SVG file generated with this simple .puml with old PlantUML (so with hyperlink working)
  • The SVG file generated with this simple .puml with newer PlantUML (so with hyperlink gone)
Thanks!
commented Aug 14 by poi (1,000 points)
edited Aug 14 by poi

A fix would be great!

This dropbox url

https://www.dropbox.com/sh/gyjl8km8l0q1k1o/AADF-iTTdYIjBSc4wnk2HwV_a?dl=0

links to

test_0_1_2018_09.puml  test_0_1_2019_7.puml   
test_0_1_2018_09.svg   test_0_1_2019_7.svg   

The file names include the PlantUML version number. The two puml-files are identical. The two svg-files differ.

The Matlab viewer handles test_0_1_2018_09.svg as expected, i.e.when over "single_method" the pointer turns into a "hand", the tooltip displays and clicking opens the source file in the Matlab editor.

With  test_0_1_2019_7.svg  the tooltip displays, but the pointer does not turn into a "hand" and clicking has no effect.

Thanks for looking into this!

PS. There is the same issue with the double bracket syntax [[. Clicking the class name, "HyperLinkIssue" in  test_0_1_2018_09.svg opens the source file in the editor. With  test_0_1_2019_7.svg it does not.

commented Sep 6 by poi (1,000 points)

I just tested with  plantuml.1.2019.9.jar. The problem remains, i.e. the tooltip displays, but the pointer does not turn into a "hand" and clicking has no effect.

0 votes
answered Sep 17 by poi (1,000 points)

Bumpsmiley

I just tested with  plantuml.1.2019.10.jar. The problem remains, i.e. the tooltip displays, but the pointer does not turn into a "hand" and clicking has no effect.

0 votes
answered Sep 18 by plantuml (208,820 points)
Could you test with last version http://beta.plantuml.net/plantuml.jar and tell us the result ?

Thanks,
0 votes
answered Sep 18 by poi (1,000 points)

Tests passed. With beta.plantuml.net/plantuml.jar the "hand" and the hyperlinks (and tooltips) work according to my expectation. That is like they did with  plantuml.1.2018.09.jar.  I've run a few diagrams including a large one. It works well. Thus, the problem is gone from my point of view.

The SVG-stuff is over my head.

Thank you for this fix!

0 votes
answered Sep 22 by poi (1,000 points)

Tests passed with  plantuml.1.2019.11.jar.

Thank you so much for fixing this issue.

/poi

...