UNPKG

1.17 kBTypeScriptView Raw
1import { EventEmitter, OnDestroy } from '@angular/core';
2import { Subscription } from 'rxjs';
3import * as i0 from "@angular/core";
4export declare class LongPressDirective implements OnDestroy {
5 pressEnabled: boolean;
6 pressModel: any;
7 duration: number;
8 longPressStart: EventEmitter<any>;
9 longPressing: EventEmitter<any>;
10 longPressEnd: EventEmitter<any>;
11 pressing: boolean;
12 isLongPressing: boolean;
13 timeout: any;
14 mouseX: number;
15 mouseY: number;
16 subscription: Subscription;
17 get press(): boolean;
18 get isLongPress(): boolean;
19 onMouseDown(event: MouseEvent): void;
20 onMouseMove(event: MouseEvent): void;
21 loop(event: MouseEvent): void;
22 endPress(): void;
23 onMouseup(): void;
24 ngOnDestroy(): void;
25 private _destroySubscription;
26 static ɵfac: i0.ɵɵFactoryDeclaration<LongPressDirective, never>;
27 static ɵdir: i0.ɵɵDirectiveDeclaration<LongPressDirective, "[long-press]", never, { "pressEnabled": "pressEnabled"; "pressModel": "pressModel"; "duration": "duration"; }, { "longPressStart": "longPressStart"; "longPressing": "longPressing"; "longPressEnd": "longPressEnd"; }, never>;
28}