mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 15:34:12 +01:00
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
/**
|
|
* touch.ts 12.4.2
|
|
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
|
|
*/
|
|
/**
|
|
* Detect touch support - Windows Surface devices and other touch devices
|
|
* should we use this instead ? (what we had for always showing resize handles)
|
|
* /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
|
*/
|
|
export declare const isTouch: boolean;
|
|
export declare class DDTouch {
|
|
/** set to true while we are handling touch dragging, to prevent accepting browser real mouse events (trusted:true) vs our simulated ones (trusted:false) */
|
|
static touchHandled: boolean;
|
|
static pointerLeaveTimeout: number;
|
|
}
|
|
/**
|
|
* Handle the touchstart events
|
|
* @param {Object} e The widget element's touchstart event
|
|
*/
|
|
export declare function touchstart(e: TouchEvent): void;
|
|
/**
|
|
* Handle the touchmove events
|
|
* @param {Object} e The document's touchmove event
|
|
*/
|
|
export declare function touchmove(e: TouchEvent): void;
|
|
/**
|
|
* Handle the touchend events
|
|
* @param {Object} e The document's touchend event
|
|
*/
|
|
export declare function touchend(e: TouchEvent): void;
|
|
/**
|
|
* Note we don't get touchenter/touchleave (which are deprecated)
|
|
* see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter
|
|
* so instead of PointerEvent to still get enter/leave and send the matching mouse event.
|
|
*/
|
|
export declare function pointerdown(e: PointerEvent): void;
|
|
export declare function pointerenter(e: PointerEvent): void;
|
|
export declare function pointerleave(e: PointerEvent): void;
|