mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Cut-off links in flowchart

Open StefanBrand opened this issue 2 years ago • 3 comments

Describe the bug Depending on the order of the statements, links get cut-off.

To Reproduce This works:

flowchart TD
    A --> B
    B --> C
    A --> C

This cuts off the left link:

flowchart TD
    A --> B
    A --> C
    B --> C
flowchart TD
    A --> B
    A --> C
    B --> C

Expected behavior The left link should have a padding to avoid cutting it off.

Screenshots image vs image

Reproducible on mermaid.live

Desktop:

  • OS: Ubuntu 20.04
  • Browser: Firefox
  • Version: 98.0

StefanBrand avatar Mar 14 '22 08:03 StefanBrand

This is a bug with both TD (on the right) and LR (on the bottom) in these cases.

image image

jnm2 avatar Jun 17 '22 16:06 jnm2

Anyone know a work around for this? Seems if there were only a 'padding' option or something?

artfulrobot avatar Jul 26 '22 12:07 artfulrobot

Work around: Use the latest v8 version instead of the v9 version (I'm using 8.14.0) and apply:

mermaid.initialize({startOnLoad:true, flowchart: {diagramPadding: 20}}

artfulrobot avatar Jul 26 '22 13:07 artfulrobot

Will be a part of release 9.1.7

knsv avatar Sep 02 '22 06:09 knsv