Commit Graph

2 Commits

Author SHA1 Message Date
Peter White de56ee21cf Fix clipped Mermaid labels at fractional browser zoom (RND-12469)
Mermaid wraps an HTML label only when its measured width equals the
wrapping width exactly. At some browser zoom levels (e.g. 90% and 175% in
Chrome) getBoundingClientRect returns 200.00001 instead of 200, so long
labels stay on one line and are clipped by the foreignObject. Patch Mermaid
to compare the rounded width.
2026-10-14 10:37:31 +02:00
Peter White b1f16dda2c Fix Mermaid block diagrams not rendering (RND-11167)
Mermaid's block layout keeps a d3 selection on each block's size and then
JSON.stringifies the blocks for a debug log. The selection references
<html>, which React hydrates with circular fiber properties, so rendering
throws and the block falls back to a plain code block. Patch Mermaid to
drop the unused selection, and version the runtime URL by patch hash so
cached runtimes are not reused.
2026-10-14 10:34:19 +02:00