Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix height of mermaid diagrams #2585

Merged
merged 4 commits into from Dec 25, 2019
Merged

fix height of mermaid diagrams #2585

merged 4 commits into from Dec 25, 2019

Conversation

@daiyam
Copy link
Contributor

daiyam commented Nov 8, 2018

Description

This change fixes the height of the mermaid diagrams.

Before After
screenshot screenshot
screenshot screenshot
screenshot screenshot

Issue fixed

Type of changes

  • ⚪️ Bug fix (Change that fixed an issue)
  • ⚪️ Breaking change (Change that can cause existing functionality to change)
  • 🔘 Improvement (Change that improves the code. Maybe performance or development improvement)
  • ⚪️ Feature (Change that adds new functionality)
  • ⚪️ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • ⚪️ I have written test for my code and it has been tested
  • 🔘 All existing tests have been passed
  • 🔘 I have attached a screenshot/video to visualize my change if possible

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

if (el.style.maxWidth) {
const maxWidth = parseFloat(el.style.maxWidth)

ratio *= el.parentNode.clientWidth / maxWidth

This comment has been minimized.

Copy link
@ZeroX-DG

ZeroX-DG Jan 19, 2019

Member

This may sound silly but can you explain to me how this works? 😄 Why did you multiply ratio with clientWidth / maxWidth?

This comment has been minimized.

Copy link
@daiyam

daiyam Jan 19, 2019

Author Contributor

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.

@ZeroX-DG

This comment has been minimized.

Copy link
Member

ZeroX-DG commented Sep 14, 2019

Sorry for let you wait for so long, can you fix the conflict @daiyam ?

@qrospars

This comment has been minimized.

Copy link

qrospars commented Dec 21, 2019

I tried on my MacOS and I can see that it works fine :) Would be nice if @daiyam could fix the merge issue.
Also remember that there was a IssueHunt page for this issue, if you want to claim the bounty: https://issuehunt.io/r/BoostIO/Boostnote/issues/2335

@daiyam

This comment has been minimized.

Copy link
Contributor Author

daiyam commented Dec 21, 2019

@qrospars I will try to fix it this week-end

Copy link
Member

ZeroX-DG left a comment

LGTM 🎉

@Rokt33r Rokt33r added this to the v0.14.0 milestone Dec 25, 2019
@Rokt33r Rokt33r merged commit 65e83e7 into BoostIO:master Dec 25, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Rokt33r Rokt33r mentioned this pull request Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.