Mermaid Zoom

pending

by Wang Xiao Zhuang

Add zoom functionality to Mermaid diagrams. Use mouse wheel or touch gestures to zoom in and out.

7 starsUpdated 2mo agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Mermaid Zoom

English | 简体中文

An Obsidian plugin that adds zoom and pan functionality to Mermaid diagrams.

Version License

Features

  • Mouse Wheel Zoom - Scroll over any Mermaid diagram to zoom in and out
  • Drag to Pan - Click and drag to move around your diagrams
  • Touch Gestures - Pinch to zoom and drag to pan on mobile devices
  • Control Buttons - Quick access to zoom in, zoom out, and reset buttons
  • Scale Indicator - Real-time display of current zoom level
  • Fullscreen Mode - Open diagrams in a modal for better viewing

Installation

Obsidian Plugin Market (Coming Soon)

Once approved, install directly from Obsidian's community plugins browser.

Manual Installation

  1. Download the latest release from GitHub Releases
  2. Extract to your vault's plugins directory:
    <your-vault>/.obsidian/plugins/mermaid-zoom
    
  3. Enable the plugin in Obsidian:
    • Settings → Community Plugins
    • Find "Mermaid Zoom" and enable it

Usage

Mouse Controls

ActionDescription
ZoomHover over a Mermaid diagram and scroll the mouse wheel
PanClick and drag to move the diagram
FullscreenClick the fullscreen button to open in modal view

Touch Controls (Mobile)

ActionDescription
ZoomPinch with two fingers
PanDrag with one finger

Control Buttons

Located in the bottom-right corner of each diagram:

  • + - Zoom in
  • - - Zoom out
  • - Reset to fit
  • - Toggle fullscreen

Development

# Install dependencies
npm install

# Development mode (watch for changes)
npm run dev

# Production build
npm run build

How It Works

The plugin automatically detects all Mermaid diagrams rendered in Obsidian and wraps each one in a zoomable container. Zoom range is configurable from 10% to 500%.

Original SVG dimensions are cached to ensure consistent scaling behavior when resetting or resizing.

License

MIT © Wang Xiao Zhuang

Support

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.