Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/interfaces/IMouseEvent.ts
1028 views
1
// tslint:disable-next-line
2
import { UnixTimestamp } from './GenericTypes';
3
4
/**
5
* Buttons are a bit field from the DOM
6
* 0 No button pressed
7
* 1 Main button pressed (usually the left button)
8
* 2 Secondary button pressed (usually the right button)
9
* 4 Auxiliary button pressed (usually the middle button)
10
*/
11
12
type PageX = number;
13
type PageY = number;
14
type OffsetX = number;
15
type OffsetY = number;
16
type NodeId = number;
17
type Buttons = number;
18
type RelatedNodeId = NodeId;
19
type MouseEventType = number;
20
21
export type IMouseEvent = [
22
MouseEventType,
23
PageX,
24
PageY,
25
OffsetX,
26
OffsetY,
27
Buttons,
28
NodeId,
29
RelatedNodeId,
30
UnixTimestamp,
31
];
32
33