import { DIVEInput } from '../Input.ts'; /** * Mouse and touch on one element, as input events. * * - left drag or one finger: `primary` * - right drag, or left with Ctrl/Meta/Shift, or two fingers: `secondary` * - right drag with Ctrl/Meta/Shift: `primary` * - middle drag: `tertiary` * - wheel and pinch: `scale` * * Movement is in `viewport` units: pixels divided by the element's height, on * both axes. */ export declare class PointerInput extends DIVEInput { /** While `false`, nothing is reported. A drag still in progress ends normally. */ enabled: boolean; private _element; /** The pointers that are down, by id, at their last client position. */ private readonly _pointers; private _channel; /** Centre of and distance between two touches, for pan and pinch. */ private readonly _centroid; private _spread; /** The element's own `touch-action`, put back when this lets go of it. */ private _touchAction; constructor(element: HTMLElement); get element(): HTMLElement; /** Moves to another element, ending whatever was in progress on the old one. */ setElement(element: HTMLElement): void; dispose(): void; private _attach; private _detach; /** Lets go of every pointer and ends the active channel. */ private _release; /** Switches the active channel, ending the previous one. */ private _begin; private _mouseChannel; /** * Picks the channel for the touches that are down. * * Runs whenever a finger lands or lifts, so going from two fingers to one * hands over from `secondary` to `primary` rather than leaving a pinch * running on a single finger. */ private _regroupTouches; /** Writes the centre of the first two touches and returns their distance. */ private _measureTouches; private _releaseCapture; private _onPointerDown; private _onPointerMove; private _onPointerUp; private _onWheel; private _onContextMenu; }