@foblex/core
Version:
A core library providing a set of utilities and interfaces for various projects.
35 lines (34 loc) • 1.25 kB
TypeScript
import { IPointerEvent } from './pointer-events';
import { ICanRunOutsideAngular } from './i-can-run-outside-angular';
export declare const MOUSE_EVENT_IGNORE_TIME = 800;
export declare abstract class IDragAndDropBase {
protected ngZone: ICanRunOutsideAngular;
private element;
private mouseListeners;
private touchListeners;
private startListeners;
isSyntheticEvent(event: MouseEvent): boolean;
private lastTouchEventTime;
isDragStarted: boolean;
private dragStartThreshold;
private dragStartDelay;
private dragStartTime;
private dragStartPosition;
abstract disabled: boolean;
private moveHandler;
protected constructor(ngZone: ICanRunOutsideAngular);
private onMouseDown;
private onTouchDown;
private onMouseMove;
private onTouchMove;
private checkDragSequenceToStart;
protected abstract prepareDragSequence(event: IPointerEvent): void;
private onMouseUp;
private onTouchUp;
private endDragSequence;
abstract onPointerDown(event: IPointerEvent): boolean;
abstract onPointerMove(event: IPointerEvent): void;
abstract onPointerUp(event: IPointerEvent): void;
subscribe(elementToSubscribe: Document): void;
unsubscribe(): void;
}