Image Zoom adds smooth, scroll-wheel zooming and panning to images in your Roam Research graph, with strong safeguards to avoid interfering with normal scrolling and Roam’s UI.
This extension is based on Wheelzoom (MIT licensed), with significant Roam-specific enhancements for safety, performance, and usability.
- 🖱 Scroll-wheel zoom on images
- ✋ Click-and-drag panning when zoomed
- 🔍 Zoom-in/zoom-out cursor hints on hover
- ⌨️ Optional modifier key requirement (prevents scroll hijacking)
- 🔁 Quick reset gesture
- 🧠 Automatically ignores Roam UI icons and chrome
- ⚡ Efficient DOM watching (no polling)
- 🧹 Clean teardown on unload or rebuild
- Modifier key + scroll wheel (recommended and default), or
- Scroll wheel only (if modifier requirement is disabled)
- Drag when zoomed (modifier required if enabled)
- Modifier-double-click → resets zoom (when modifier requirement is enabled)
- Double-click → resets zoom (when modifier requirement is disabled)
These gestures are designed to avoid triggering Roam’s image popover or editor behaviors, including after drag or reset interactions.
All settings are available in Roam Depot → Image Zoom.
Controls how much each scroll step zooms.
- Range:
0.01 – 0.50 - Default:
0.10
Maximum zoom multiplier relative to the image’s rendered size.
- Example:
4= 4× zoom - Use
0for unlimited - Default:
0
If enabled, zooming and panning only activate when a modifier key is held.
- Prevents accidental scroll hijacking
- Strongly recommended
- Default: Enabled
Which key must be held when the modifier requirement is enabled.
- Options:
Alt,Ctrl,Shift,Meta - Default:
Alt - On macOS, Ctrl+click is right‑click; prefer Alt/Shift/Meta.
Skips very small images (icons, UI glyphs).
- Applies to natural size or rendered size
- Default:
80 × 80 px
- Images are processed once per lifecycle
- Re-processed automatically if:
- the image
srcchanges (e.g. lazy-load or re-render) - settings are changed
- the image
- Re-processed automatically if:
- Uses a MutationObserver instead of polling
- Stores and restores the original image
srcsafely - Only images initialized by this extension are torn down
- All event handling is scoped to prevent Roam UI side effects
- No external network requests
- No HTML injection
- No DOM polling
- Fully unloads on extension disable
- Designed to coexist safely with Roam’s image popovers and editor behaviors
- Wheelzoom by Jack Moore
MIT License — http://www.jacklmoore.com/wheelzoom
MIT