RobertWeinmeister / dokuwiki-mermaid

A plugin for DokuWiki to support Mermaid.
GNU General Public License v2.0
3 stars 0 forks source link

Flowchart node with image not scaling. #11

Closed maeltalyon closed 1 year ago

maeltalyon commented 1 year ago

Verisons: DokuWiki: JackJackrum mermaidplugin: 2023-07-21 version: locally hostet 10.2.4 and remote hostet latest

Problem:

%%{init: {'theme':'base'}}%% flowchart TD K1["[[Link]] <"img src="lib/exe/fetch.php?media=namespace:image.jpg" width=200 height=200/> "] --- K3( test) K2 --- K3

The height parameter ist changing the height of the image and the node, but the with is fixed to the length of the link or text entered. Changing this parameter has no impact and the image is unreadable.

Overall thanks for this nice plugin, i love it.

RobertWeinmeister commented 1 year ago

I mulled over this for quite some time now. The image scales automatically to fit the node, which in almost all cases is the desired behaviour. Workaround for you would be to fill it with some protected whitespace.

In any case, the plugin just replicates Mermaid behaviour, and as far as I could tell, it behaves exactly the same there, unless you have an example you could provide me where the behaviour differs.