Modify

Opened 16 months ago

Closed 11 months ago

Last modified 8 months ago

#10998 closed enhancement (fixed)

Support for imagemaps

Reported by: dries.decock@… Owned by: rjollos
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 16 months ago by rjollos

  • Owner changed from airadier to rjollos

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 16 months ago by rjollos

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

comment:3 Changed 16 months 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 16 months 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 months ago by rjollos

#11326 closed as a duplicate and has a patch.

comment:6 Changed 11 months ago by rjollos

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 months ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

comment:8 Changed 11 months ago by rjollos

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 8 months ago by rjollos

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 8 months ago by rjollos

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!

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.