Modify

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#10998 closed enhancement (fixed)

Support for imagemaps

Reported by: dries.decock@… Owned by: Ryan J Ollos
Priority: normal Component: PlantUmlMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

PlantUML now also support image maps to create external links ( urls, ... ) from a UML diagram. It would be great if this was supported by the Trac macro.

Attachments (0)

Change History (10)

comment:1 Changed 11 years ago by Ryan J Ollos

Owner: changed from Álvaro Iradier to Ryan J Ollos

I didn't find any documentation on this yet, but found this forum post that describes the feature.

What markup does the macro produce if you try the examples from that forum post?:

@startuml
List <|-- ArrayList
url of List is [[http://www.google.com]]
@enduml
@startuml
Bob -> Alice : ok
url of Bob is [[http://www.google.com]]
@enduml

comment:2 Changed 11 years ago by Ryan J Ollos

I noticed a jQuery integration that we may want to look at adding support for in the future as well: #11002.

comment:3 Changed 11 years ago by dries.decock@…

More information can be found at the bottom of this link : http://plantuml.sourceforge.net/incubation.html

When I run the first example, it will generate an image file, and a file, called example.cmapx, with the following content:

<map id="example_map" name="example_map">
<area shape="rect" id="id1" href="http://www.google.com" title="http://www.google.com" alt="" coords="22,8,75,56"/>
</map>

comment:4 Changed 11 years ago by dries.decock@…

The second example, creates a cmapx file with this content:

<map id="example2_map" name="example2_map">
<area shape="rect" id="Bob" href="http://www.google.com" title="http://www.google.com" coords="5,0,48,34"/>
</map>

comment:5 Changed 11 years ago by Ryan J Ollos

#11326 closed as a duplicate and has a patch.

comment:6 Changed 11 years ago by Ryan J Ollos

In 13395:

Added support for image maps. Refs #10998.

Thanks to Erwin Rademakers for the initial version of the patch applied here.

comment:7 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

comment:8 Changed 11 years ago by Ryan J Ollos

In 13397:

Fixed some defects in [13395]: added support for image maps. Refs #10998.

It seems that PlantUML only supports using stdin and stdout together, and there doesn't seem to be a way to generate the image map content when outputting to stdout. The documentation on image maps from PlantUML is almost non-existent, so it is hard to be sure. Therefore, we output the markup to a file, and pass the filepath of the markup file to PlantUML, outputting the png and cmapx to files in the same directory.

Thanks to Erwin Rademakers for coming up with this solution, and testing r13395.

comment:9 Changed 10 years ago by Ryan J Ollos

In 13476:

2.0dev: Restore Python 2.4 compatibility after [13395]. Fixes #11364, Refs #10998.

Untested patch. Please report any issues to #11364.

comment:10 Changed 10 years ago by Ryan J Ollos

I haven't had a chance to test the change, so I appreciate if you can report back to confirm that it works okay. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.