kylec32 / dokuwiki_plantumlparser

A plugin to have a user's browser display a SVG PlantUML diagram generated at http://plantuml.com/
MIT License
8 stars 12 forks source link

Influence the size of the graphic #41

Open Bobby862 opened 2 years ago

Bobby862 commented 2 years ago

Added Feature to influence size of the plant uml graphic. Feature:

kylec32 commented 2 years ago

Thanks for working on this. It makes a lot of sense. The one thing maybe worth changing is that, even though the scale parameter expects a percentage, if a user puts in simply a number it treat it as pixels. Maybe only act if they provide the percentage or treat everything as a percentage?

Bobby862 commented 2 years ago

Hi Kylec32, Hmm good question, I used a percent sign here to tell the user that it is always a value that refers to the current page width. On the one hand, my problem was that I had UML diagrams that were not displayed completely because they were too big, and I wanted to limit them to 100% page width so that they are always displayed completely.

And the other problem was that depending on the end user device (PC or mobile phone), the page width was also different. As a result, it could be that the Plant UML diagram was displayed correctly on the PC, but not on the mobile phone. That's why I decided to use the Scale parameter so that the Plant UML diagram can be displayed correctly on all end device types.

The current disadvantage of my implementation is that a small UML diagram is now scaled up to 100%, even if it is not necessary. As an end user, I would find it better if the diagram is always drawn in the original size , only if it no longer fits on the page, then it should limit to 100%.

But unfortunately I didn't know how to implement this functionality. Hope this information transport the problem which i wanted to solve, and some additional information around it. Thank you very much for your thoughts.