UNPKG

@aurigma/design-atoms

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

54 lines (53 loc) 1.74 kB
import { IInputManager, IInputParams, INativeEvent, Button } from "./IInputManager"; import { PointF } from "@aurigma/design-atoms-model/Math"; import { ICoordinatesConvertor } from "./ICoordinatesConvertor"; export declare class InputManager implements IInputManager { private _convertor; private _settings; private _longTapTimeout; private _transformPoints; private _touchEndCancel; private _keyMap; private _currentAction; private _pointerInputHelper; constructor(_convertor?: ICoordinatesConvertor, settings?: IInputManagerSettings); raiseNativeEvent(event: INativeEvent): void; private _onMouseDown; private _onMouseMove; private _onMouseUp; private _onTouchStart; private _onTouchMove; private _onTouchEnd; private _resetState; private _clearLongTapTimeout; private _onLongTap; private _pointerEventNotify; private _transformEventNotify; private _calculateScale; private _calculateTransform; private _getPointerArgs; private _getFirstCoordinate; private _dragEventNotify; private _onKeyDown; private _onKeyUp; private _emitKeyEvent; private _onWheel; private _emitEvent; private _inputEvent; addOnInput(handler: (params: IInputParams) => any): void; removeOnInput(handler: (params: IInputParams) => any): void; dispose(): void; } export interface IInputManagerSettings { clickThreshold?: number; tapThreshold?: number; doubleTapTime?: number; longTapTime?: number; minimalScaleDistance?: number; doubleTapThreshold?: number; } export interface IClickInfo { time: number; point: PointF; button: Button; }