Skip to content

Fix UNSCRO diagram embed: make it resize and clickable

Steve CAPELL requested to merge fix-unscro-diagram-embed into main

The StarUML export has fixed width/height and no viewBox, so it couldn't scale to the box; and the transparent link overlays used fill-opacity=0, which isn't reliably clickable.

  • annotate-unscro.mjs: inject a viewBox (from the pixel size) and set the SVG to width/height 100% + preserveAspectRatio, so it scales to fit; add pointer-events="all" to every link overlay so boxes are clickable.
  • app/globals.css + layout import: size the embed via a .unscro-diagram class (width:100%, aspect-ratio 1277/1212, max-height 90vh).
  • unscro.md: object uses className="unscro-diagram".

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Merge request reports

Loading