UNPKG

891 BTypeScriptView Raw
1import { RenderingContext2D } from './types';
2import { BoundingBox } from './BoundingBox';
3import { Screen } from './Screen';
4import { Element } from './Document';
5interface IEventTarget {
6 onClick?(): void;
7 onMouseMove?(): void;
8}
9export interface IEvent {
10 type: string;
11 x: number;
12 y: number;
13 run(eventTarget: IEventTarget): void;
14}
15export declare class Mouse {
16 private readonly screen;
17 private working;
18 private events;
19 private eventElements;
20 constructor(screen: Screen);
21 isWorking(): boolean;
22 start(): void;
23 stop(): void;
24 hasEvents(): boolean;
25 runEvents(): void;
26 checkPath(element: Element, ctx: RenderingContext2D | null): void;
27 checkBoundingBox(element: Element, boundingBox: BoundingBox | null): void;
28 private mapXY;
29 private onClick;
30 private onMouseMove;
31}
32export {};
33//# sourceMappingURL=Mouse.d.ts.map
\No newline at end of file