Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipemap only works if an href is provided #1429

Open
dgutson opened this issue May 21, 2023 · 5 comments
Open

pipemap only works if an href is provided #1429

dgutson opened this issue May 21, 2023 · 5 comments
Labels
enhancement New feature or request triage

Comments

@dgutson
Copy link

dgutson commented May 21, 2023

Describe the bug
Currently, I am forced to provide a link to a component in order to get an image map file.
Sometimes I don't need a link, just the title explanatory text.

To Reproduce
given foo.text:

@startuml
component foo1 as "My comp" [[pepe]]
@enduml

then

cat foo.txt | java -jar plantuml.jar -pipemap

I get

<map id="plantuml_map" name="plantuml_map">
<area shape="rect" id="id1" href="pepe" title="pepe" alt="" coords="7,7,109,53"/>
</map>

now remove [[pepe]]
run the same command, and the map is not generated

Expected behavior
the map is generated

Desktop (please complete the following information):

  • OS: linux
  • Version 1.2023.4
@dgutson
Copy link
Author

dgutson commented May 21, 2023

tagging @simonbrowndotje because one this is fixed, it would be an amazing feature for the plantUML exporters

arnaudroques added a commit that referenced this issue May 22, 2023
@arnaudroques
Copy link
Contributor

This may be fixed in last snapshot.

Tell us if it's not working for you, thanks

@arnaudroques arnaudroques added bug Something isn't working and removed triage labels May 22, 2023
@dgutson
Copy link
Author

dgutson commented May 22, 2023

Nop, not working. Tried it with

@startuml
component foo1 as "My comp"
component foo2 as "My comp2"

foo1 -> foo2
@enduml

and the result was

<map id="plantuml_map" name="plantuml_map">
</map>

@arnaudroques
Copy link
Contributor

Ok, I did not get your need initially.
You want to have a map generated with all components coords even if there is no link.

So you would like that:

@startuml
component foo1 as "My comp"
@enduml

generates:

<map>
<area shape="rect" id="foo1" coords="7,7,109,53"/>
</map>

It that right?

@arnaudroques arnaudroques reopened this May 22, 2023
@arnaudroques arnaudroques added enhancement New feature or request and removed bug Something isn't working labels May 22, 2023
@dgutson
Copy link
Author

dgutson commented May 22, 2023

almost :) the map needs the title field for the tooltip to work.

However, and maybe this is a feature request, I'd like to be able to set it somehow (an attribute?)

Usecase: to expand acronyms on mouseover. Usually compononents are shortened by acronyms because otherwise they take too much space in the drawing, and it is how engineers call them. New engineers can just roll the mouse on and get the expanded name.

I changed the output of this example:

@startuml
component foo1 as "My comp" [[My_component_1]]
component foo2 as "My comp2" [[My_component_2]]

foo1 -> foo2
@enduml

to match:

    <map id="plantuml_map" name="plantuml_map">
        <area shape="rect" id="id1" title="My component #1" alt="" coords="7,7,109,53"/>
        <area shape="rect" id="id2" title="My component #2" alt="" coords="144,7,255,53"/>
    </map>

where I removed the href and replaced the title with something meaningul.

A webpage could then be (I couldn't attach it, github didn't allow me)

<!DOCTYPE html>
<html>
  <head>
    <title>Example HTML Page</title>
  </head>
  <body>
    <img src="foo.png" usemap="#plantuml_map">
    <map id="plantuml_map" name="plantuml_map">
        <area shape="rect" id="id1" title="My component #1" alt="" coords="7,7,109,53"/>
        <area shape="rect" id="id2" title="My component #2" alt="" coords="144,7,255,53"/>
    </map>
  </body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

2 participants