hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
212 stars 58 forks source link

Hyperlinks are rendered but are not clickable #160

Open steghoja opened 2 years ago

steghoja commented 2 years ago

For a simple dot file such as the one below, the links are rendered correctly, but they are not clickable. Im am using the PlantUML plugin in version 1.1.26. This certainly worked in a previous versions, so maybe this is a regression.

@startuml
left to right direction
object "Test1 [[http://eclipse.org (Go to)]]" as o0 #pink
object "Test2 [[http://eclipse.org (Go to)]]" as o1
o0--o1: Connection
@enduml
hallvard commented 2 years ago

The links are rendered by the underlying library, but the plugin handles the clickability, based on link coordinates that are reported by the library. There may be some mistake in these coordinates and/or how they are used, can you see if you some other rectangles in the viewport are clickable and if there seems to be some systematic offset and/or scaling error?

steghoja commented 2 years ago

Yes, there seems to be an offset! It is towards the left of the link, in the example it is right on the lefthand boundary of the rectangle for the object. But the clickable area also seems to have incorrect width and height -- it only seems to be some pixels wide and high.

steghoja commented 2 years ago

I cannot, however, find the clickable area for the second link for the "Test2" object in the example.

hallvard commented 2 years ago

I can reproduce it and will have a look. Thanks for reporting!

hallvard commented 2 years ago

In an earlier release I added workaround code to handle a bug in the underlying plantuml library concerning links, and now the workaround doesn't seem to work anymore. At least, after commenting it out, the problem seems to be gone. Hopefully, the underlying library has fixed its bug, so the workaround isn't needed anymore.