fix height of mermaid diagrams#2585
Conversation
| if (el.style.maxWidth) { | ||
| const maxWidth = parseFloat(el.style.maxWidth) | ||
|
|
||
| ratio *= el.parentNode.clientWidth / maxWidth |
There was a problem hiding this comment.
This may sound silly but can you explain to me how this works? 😄 Why did you multiply ratio with clientWidth / maxWidth?
There was a problem hiding this comment.
It's to compensate the max-width 100% !important applied on the svg.
el.parentNode.clientWidth / maxWidth is the ratio between the available space and the diagram that mermaid wanted.
|
Sorry for let you wait for so long, can you fix the conflict @daiyam ? |
|
I tried on my MacOS and I can see that it works fine :) Would be nice if @daiyam could fix the merge issue. |
|
@qrospars I will try to fix it this week-end |
Description
This change fixes the height of the mermaid diagrams.
Issue fixed
Type of changes
Checklist:
IssueHunt Summary
Referenced issues
This pull request has been submitted to:
IssueHunt has been backed by the following sponsors. Become a sponsor