UNPKG

@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.

31 lines (30 loc) 1.95 kB
import { PanInputOption } from "./inputType/PanInput"; import { PinchInputOption } from "./inputType/PinchInput"; import { ObjectInterface } from "./types"; export declare const toArray: (nodes: NodeList) => HTMLElement[]; export declare const $: (param: any, multi?: boolean) => any; export declare const requestAnimationFrame: (fp: any) => any; export declare const cancelAnimationFrame: (key: any) => void; export declare const map: <T, U>(obj: ObjectInterface<T>, callback: (value: T, key: string) => U) => ObjectInterface<U>; export declare const filter: <T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean) => ObjectInterface<T>; export declare const every: <T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean) => boolean; export declare const equal: (target: ObjectInterface, base: ObjectInterface) => boolean; export declare const roundNumber: (num: number, roundUnit: number) => any; export declare const roundNumbers: (num: ObjectInterface<number>, roundUnit: ObjectInterface<number> | number) => ObjectInterface<number>; export declare const getDecimalPlace: (val: number) => number; export declare const inversePow: (n: number) => number; export declare const getRoundFunc: (v: number) => (n: number) => number; export declare const getAngle: (posX: number, posY: number) => number; export declare const isCssPropsFromAxes: (originalCssProps: { [key: string]: string; }) => boolean; export declare const getDirection: (useHorizontal: boolean, useVertical: boolean) => number; export declare const useDirection: (checkType: number, direction: number, userDirection?: number) => boolean; export declare const setCssProps: (element: HTMLElement, option: PanInputOption | PinchInputOption, direction: number) => { [key: string]: string; }; export declare const revertCssProps: (element: HTMLElement, originalCssProps: { [key: string]: string; }) => { [key: string]: string; };