fusuma icon indicating copy to clipboard operation
fusuma copied to clipboard

Mermaid diagrams are cropped

Open jcayzac opened this issue 4 years ago • 4 comments

Info

  • Operating System: macOS 11.2
  • Node Version: 15.6.0
  • Browser Name and Version: Chrome 88
  • Fusuma Version: 2.5.0

Type

  • [x] bug
  • [ ] feature request

For Bugs

With the default theme, mermaid diagrams that are larger than 320px are cropped.

Screen Shot 2021-02-18 at 18 16 45

Expected Behavior

Diagrams aren't cropped but resized instead.

Actual Behavior

Diagrams are cropped.

How can we reproduce the behavior?

Test diagram:

gitGraph:
options
{
  "nodeSpacing": 150,
  "nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch

jcayzac avatar Feb 18 '21 09:02 jcayzac

Fixed, thanks. https://hiroppy.github.io/fusuma/advanced/#slide-1

hiroppy avatar Feb 18 '21 13:02 hiroppy

@hiroppy thank you. It still looks cropped on my phone tho (the SVG doesn't seem to have CSS to constrain its width to the viewport):

Screenshot_20210218_220438_com android chrome

jcayzac avatar Feb 18 '21 13:02 jcayzac

yeah, I think we should add overflow to the container class. I'll consider it.

hiroppy avatar Feb 18 '21 13:02 hiroppy

hm, I checked it but mermaid calculates the current client size and yes it doesn' have viewport....

hiroppy avatar Feb 18 '21 13:02 hiroppy