How to override diagram's height?

Wow. I love it!

In my first interaction with it I’ve found that when I go to edit the ascii text the height instructions for svgbob are rewritten to the initial value that I set. In my case, I set it to height=21. Now I want it to be much larger but something keeps overwriting that value and it reverts to 21. It feels very javascript. Is it just me or has someone else seen this. I’ve on a hosted Discourse instance, so up-to-date with Discourse.

1 Like

yeah it auto calculates the height, I totally can get that it can be somewhat annoying if you want to override, can you paste the ascii for diagram? Is it cropped at height 21?

In some iterations it was cropping at 21. Currently it isn’t, though it is cropping a little bit short of full height and the SVG is displaying a scrollbar on the right hand side.

Here’s the code, I copied it from the svgbob examples, and added a small piece of my own at the top.

o-> Simple Things

+------+      +-------+
| user | o--> | notes |
+------+      +-------+


 o-> Mindmaps

                                            .-->  Alpha
                                           /
                                          .---->  Initial Release
          Planning *-------.             /         \
                            \           /           '---> Patch 1
      Initial research       \         /             \
                *             \       /               '-->  Patch 2
                 \             \     /---------> Beta
                  \             \   /
                   \             o o                      _______
                    \          .---. *--.___             /       \
                     '------> (     )       '------O->  . Release .
                               `---' o                   \_______/
                               o  o o \
                              /    \ \ \
                          .--'      \ \ \
                         /           \ \ '----+->  Push backs
                        /             \ \      \
                       /|              \ \      '----> Setbacks
                      / |               \ \
                     V /|                \ '-----> Reception
                Team  / |                 \
                     v /|                  \
             Worklaod / .                   '-->> Career change
                     V /
                 PTO  /
                     V
                 Bug

1 Like

Oh I think we have a 500px max height on code blocks (just like your example above). svgbob is inheriting it.

I guess there is no huge harm in removing this limitation? In the mean time you can easily just add a theme component to your site that overrides this.

Something like

.cooked {
  pre[data-code-wrap="svgbob"] {
    max-height: 10000px;
   }
}
1 Like

That’s good to know. I’ll watch and see how it’s used. The initial feedback is negative :roll_eyes: