hiroppy / fusuma

✍️ Fusuma makes slides with Markdown easily.
https://hiroppy.github.io/fusuma
5.38k stars 194 forks source link

Mermaid diagrams are cropped #391

Open jcayzac opened 3 years ago

jcayzac commented 3 years ago

Info

Type

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
hiroppy commented 3 years ago

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

jcayzac commented 3 years ago

@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

hiroppy commented 3 years ago

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

hiroppy commented 3 years ago

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