Mermaid Zoom

by xiaozhuang0433
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Add zoom functionality to Mermaid diagrams. Use mouse wheel or touch gestures to zoom in and out.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
1
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

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

Action Description
Zoom Hover over a Mermaid diagram and scroll the mouse wheel
Pan Click and drag to move the diagram
Fullscreen Click the fullscreen button to open in modal view

Touch Controls (Mobile)

Action Description
Zoom Pinch with two fingers
Pan Drag 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