kejtos
kejtos5w ago

.center() changes size of flowchart

I have got this flowchart: mo.mermaid( """ flowchart TD B[B] B --> CC] C --> D[D] D --> E[E] E --> F[F] F --> G[G] G --> H[H] %% Define a class for rounded rectangles with transparent fill classDef roundedRect fill:transparent, stroke:#333, stroke-width:3px, rx:10, ry:10; %% Apply the class to all nodes class A,B,C,D,E,F,G,H roundedRect; """ ) which is slightly larger than the output cell. When I use the .center() method, the chart gets smaller to fit in the cell. Is it a desired behavior, or a bug?
4 Replies
Myles Scolnick
can you share a screenshot? i tried running this code and might be seeing somethign different
No description
Myles Scolnick
also, i just upgraded mermaid to v11 in our repo (so i could be seeing something different b/c of that)
kejtos
kejtosOP5w ago
interestingly, I tried to put different stuff inside the nodes, and only this one on the screenshot does that.
No description
Myles Scolnick
maybe its right at the cuttoff of being too tall. and when we center something, we wrap it in another <div> so maybe the extra html DOM element just happens to change the padding so slightly