Shoji API Reference
    Preparing search index...

    Interface ZoomOptions

    interface ZoomOptions {
        maxScale?: number;
        doubleTapScale?: number;
        buttonStep?: number;
        mouseWheelZoom?: boolean | "ctrl";
    }
    Index
    maxScale?: number

    Multiplier cap for pinch/wheel/button zoom. "Actual size" can exceed this deliberately — it's an explicit action, not continuous gesture zoom. Default 4.

    doubleTapScale?: number

    Scale a double-tap/double-click jumps to; a second one while already zoomed resets to 1 instead. Default 2.

    buttonStep?: number

    Multiplier applied per zoom-in/zoom-out toolbar button click. Default 1.5.

    mouseWheelZoom?: boolean | "ctrl"

    Which wheel/trackpad-scroll input zooms the active photo, on top of pinch, the toolbar buttons, and w/s. true (default): any wheel event zooms, ctrl or not. This is the only way to make a trackpad's plain two-finger drag zoom — trackpads never expose raw multi-touch to the browser at all, so a two-finger drag/scroll and an ordinary one-finger scroll (or a bare mouse wheel) are all just the same plain wheel event, indistinguishable from each other. As an unavoidable side effect, a bare mouse wheel also zooms, with nothing to tell that apart from a trackpad either — inside a full-screen modal with no page behind it to scroll, this reads as a feature (a wheel/trackpad zoom shortcut, on top of everything else), not a conflict with anything. 'ctrl': only ctrl+wheel — the one case a trackpad's own gesture recognition reports distinctly, since that's how the OS/browser already reports a genuine two-finger pinch specifically (unlike a plain drag). false: wheel/trackpad input never zooms at all.