xaoxuu / hexo-theme-stellar

内置文档系统的简约商务风Hexo主题,支持大量的标签组件和动态数据组件。
https://xaoxuu.com/wiki/stellar/
MIT License
1.3k stars 319 forks source link

mermaid图表过大问题,超过屏幕范围,没有滚动条 #463

Closed AnthonyZhai closed 4 months ago

AnthonyZhai commented 4 months ago

检查清单

问题描述

问题描述

因为使用mermaid画的树形图太大,导致图超出屏幕范围,且没有滚动条可以滑动。所以,试图尝试将mermaid图放入box 盒子容器中。

代码

_posts/xxx.md

{% box %}
```mermaid
graph TB
A((5))
B((6))
C((4))
D((10))
E((5))
F((7))
G((12))
H((3))
I((5))
J((8))
K((9))
L((11))
M((20))
N((4))
O((6))
P((10))
Q((6))
R((8))
S((14))
T((8))
U((10))
V((18))
W((10))
X((12))
Y((22))
Z((17))
AA((19))
AB((36))
A---B
A---C
A---D
B---E
B---F
B---G
C---H
C---I
C---J
D---K
D---L
D---M
E---N
E---O
E---P
F---Q
F---R
F---S
K---T
K---U
K---V
L---W
L---X
L---Y
V---Z
V---AA
V---AB
\```         #为了显示正确加入\,实际没有
{% endbox %}

结果

使用上述代码后,导致mermaid不能正常显示。

image

求助

如何让超过范围的mermaid图可以缩放,或者加入滚动条,或者限制在一定范围内。

xaoxuu commented 4 months ago

已修复,现在可以滚动了。

放到 box 里面不兼容这个问题不好改。

github-actions[bot] commented 4 months ago

:wave: Hello, This bug has been fixed, please update your stellar.

:wave: 您好, 此 BUG 已经被修复,请更新您的 Stellar 版本。

xaoxuu commented 4 months ago

需要更新到 main 分支 376a3d8a2eb9d70ba795d0fc617a876e32b16a94