1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | declare class DOMMouseMoveTracker {
|
10 |
|
11 | constructor(onMove: Function, onMoveEnd: Function, domNode: HTMLElement);
|
12 | /**
|
13 | * This is to set up the listeners for listening to mouse move
|
14 | * and mouse up signaling the movement has ended. Please note that these
|
15 | * listeners are added at the document.body level. It takes in an event
|
16 | * in order to grab inital state.
|
17 | */
|
18 |
|
19 | captureMouseMoves(event: object): void;
|
20 |
|
21 | /**
|
22 | * These releases all of the listeners on document.body.
|
23 | */
|
24 | releaseMouseMoves(): void;
|
25 |
|
26 | /**
|
27 | * Returns whether or not if the mouse movement is being tracked.
|
28 | */
|
29 | isDragging(): boolean;
|
30 |
|
31 | /**
|
32 | * Calls onMove passed into constructor and updates internal state.
|
33 | */
|
34 | _onMouseMove(
|
35 |
|
36 | event: object,
|
37 | ): void;
|
38 |
|
39 | _didMouseMove(): void;
|
40 |
|
41 | /**
|
42 | * Calls onMoveEnd passed into constructor and updates internal state.
|
43 | */
|
44 | _onMouseUp(): void;
|
45 | }
|
46 |
|
47 | declare namespace DOMMouseMoveTracker {}
|
48 |
|
49 | export = DOMMouseMoveTracker;
|