PinchZoomDetector

Primitive #49

🔍 Problem it solves

Image galleries and maps need pinch‑to‑zoom gesture detection. Raw touch events for multi‑touch are complex (touch points, scale calculation, center point).

✅ Solution

PinchZoomDetector listens for two‑finger gestures, calculates the distance between fingers to determine scale, and provides the center point. It triggers callbacks (onPinchStart, onPinchMove, onPinchEnd). This demo applies scale to an image.

🧩 Used by components

ImageViewer, MapComponent, CanvasEditor, PDFViewer, PhotoEditor

🎮 Interactive demo