@egjs/axes
Version:
A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.
36 lines (35 loc) • 990 B
TypeScript
import { ElementType } from "../types";
import { InputType, InputTypeObserver } from "./InputType";
export interface PinchInputOption {
scale?: number;
threshold?: number;
inputType?: string[];
touchAction?: string;
}
export declare class PinchInput implements InputType {
options: PinchInputOption;
axes: string[];
element: HTMLElement;
private _observer;
private _pinchFlag;
private _enabled;
private _originalCssProps;
private _activeEvent;
private _baseValue;
private _isOverThreshold;
constructor(el: ElementType, options?: PinchInputOption);
mapAxes(axes: string[]): void;
connect(observer: InputTypeObserver): InputType;
disconnect(): this;
destroy(): void;
enable(): this;
disable(): this;
isEnabled(): boolean;
private _onPinchStart;
private _onPinchMove;
private _onPinchEnd;
private _attachEvent;
private _detachEvent;
private _getOffset;
private _getDistance;
}