Skip to content

v0.4.1

Choose a tag to compare

@olibaron olibaron released this 02 Sep 11:44
· 9 commits to main since this release

Fixed

The wheel is left to the page. Zoom took every wheel event over a diagram, so scrolling stopped the moment the cursor crossed one — and a document can be mostly diagram. Zoom now waits for Ctrl (or ), which is what the browser itself zooms on and what a trackpad pinch already sends: pinching still zooms the diagram, two fingers still scroll the page.

Edges fade instead of cutting. A zoomed diagram ended mid-stroke at the border. A 10px fade masks each edge now. It is a mask rather than a painted overlay, so it fades to transparent and sits correctly over a panel, a page, or nothing without being told the colour — and a rounded container needs no special case, its corner arc falling inside the faded band.

A held zoom button repeats. Stepping a tenth at a time meant a click per step. Holding zoom in or out now repeats after a short delay, and stops on release, on cancel, on leaving the button, and on unmount.

Notes

The fade sits on an internal .mermaid-pan-zoom-viewport element wrapping the diagram content — on the content itself the mask would scale and pan along with the diagram instead of staying pinned to the border. A host that styles diagram internals by class may want to know it is there.

The publish workflow is gone. Publishing runs locally under the account's two-factor auth, so it had stopped running on releases in 0.2.1 and had nothing left to do.

Compatibility

No API change: no new options, no signature changes. Patch release.