Skip to content

1.3.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 22:55
· 33 commits to main since this release

New

  • render() accepts a model returned by parse(), so the same diagram can be rendered at different widths or with different fonts without parsing again. parse() now accepts config.
  • mount() supports watch: false for apps that manage resizing and font loading themselves. Call fit() after resizing and refresh() after font or theme changes.
  • Exported forgetTextWidths() to clear cached measurements after a web font loads.
  • enableZoom() supports watch: false, with resized() for host-managed resizing.
  • Added links: false and images: false to omit all diagram links and images, including relative addresses and internal links.

Improvements

  • Mounted diagrams parse once and reuse the model for subsequent renders.
  • Mounting a new diagram in the same container stops the previous mount.

Fixes

  • Removed diagrams and font-listener bookkeeping can be garbage collected without calling destroy().
  • Diagrams mounted or updated outside the document are measured again when reinserted.
  • refresh() transfers observation and remeasures fonts after a diagram moves to another window.
  • Failed updates preserve the previous diagram. If onRender throws after rendering, the new drawing remains committed.
  • Disallowed link targets and images are omitted instead of replaced with about:blank, preventing blocked links from navigating to a blank page.