1 | import { Coordinate } from './coordinate';
|
2 | import MapEvent from './MapEvent';
|
3 | import { Pixel } from './pixel';
|
4 | import PluggableMap, { FrameState } from './PluggableMap';
|
5 |
|
6 | export default class MapBrowserEvent<EVENT extends UIEvent = UIEvent> extends MapEvent {
|
7 | constructor(
|
8 | type: string,
|
9 | map: PluggableMap,
|
10 | originalEvent: EVENT,
|
11 | opt_dragging?: boolean,
|
12 | opt_frameState?: FrameState,
|
13 | );
|
14 | /**
|
15 | * The coordinate corresponding to the original browser event. This will be in the user
|
16 | * projection if one is set. Otherwise it will be in the view projection.
|
17 | */
|
18 | coordinate: Coordinate;
|
19 | /**
|
20 | * Indicates if the map is currently being dragged. Only set for
|
21 | * POINTERDRAG and POINTERMOVE events. Default is false.
|
22 | */
|
23 | dragging: boolean;
|
24 | /**
|
25 | * The map pixel relative to the viewport corresponding to the original event.
|
26 | */
|
27 | pixel: Pixel;
|
28 | /**
|
29 | * Prevents the default browser action.
|
30 | * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.
|
31 | */
|
32 | preventDefault(): void;
|
33 | /**
|
34 | * Prevents further propagation of the current event.
|
35 | * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.
|
36 | */
|
37 | stopPropagation(): void;
|
38 | /**
|
39 | * The original browser event.
|
40 | */
|
41 | originalEvent: EVENT;
|
42 | }
|