@antv/l7-map 2.21.11-beta.5 → 2.21.11-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -6
- package/es/index.d.ts +3 -4
- package/es/index.js +2 -4
- package/es/map/camera.d.ts +690 -0
- package/es/map/camera.js +1138 -0
- package/{lib → es/map}/css/l7.css +41 -7
- package/es/map/events.d.ts +384 -0
- package/es/map/events.js +222 -0
- package/es/map/geo/edge_insets.d.ts +97 -0
- package/es/{geo → map/geo}/edge_insets.js +55 -33
- package/es/map/geo/lng_lat.d.ts +116 -0
- package/es/map/geo/lng_lat.js +159 -0
- package/es/map/geo/lng_lat_bounds.d.ts +217 -0
- package/es/map/geo/lng_lat_bounds.js +334 -0
- package/es/map/geo/mercator_coordinate.d.ts +113 -0
- package/es/map/geo/mercator_coordinate.js +142 -0
- package/es/map/geo/transform.d.ts +262 -0
- package/es/map/geo/transform.js +736 -0
- package/{lib → es/map}/handler/box_zoom.d.ts +30 -24
- package/es/map/handler/box_zoom.js +145 -0
- package/es/map/handler/click_zoom.d.ts +24 -0
- package/es/map/handler/click_zoom.js +47 -0
- package/es/map/handler/cooperative_gestures.d.ts +40 -0
- package/es/map/handler/cooperative_gestures.js +94 -0
- package/es/map/handler/drag_handler.d.ts +88 -0
- package/es/map/handler/drag_handler.js +89 -0
- package/es/map/handler/drag_move_state_manager.d.ts +30 -0
- package/es/map/handler/drag_move_state_manager.js +94 -0
- package/es/map/handler/handler_util.d.ts +3 -0
- package/es/{handler → map/handler}/handler_util.js +1 -2
- package/es/map/handler/keyboard.d.ts +88 -0
- package/es/map/handler/keyboard.js +197 -0
- package/es/map/handler/map_event.d.ts +46 -0
- package/es/map/handler/map_event.js +131 -0
- package/es/map/handler/mouse.d.ts +30 -0
- package/es/map/handler/mouse.js +85 -0
- package/es/map/handler/one_finger_touch_drag.d.ts +15 -0
- package/es/map/handler/one_finger_touch_drag.js +39 -0
- package/es/map/handler/scroll_zoom.d.ts +102 -0
- package/es/map/handler/scroll_zoom.js +312 -0
- package/es/{handler → map/handler}/shim/dblclick_zoom.d.ts +14 -10
- package/es/{handler → map/handler}/shim/dblclick_zoom.js +20 -16
- package/es/map/handler/shim/drag_pan.d.ts +79 -0
- package/es/map/handler/shim/drag_pan.js +77 -0
- package/es/{handler → map/handler}/shim/drag_rotate.d.ts +24 -16
- package/es/map/handler/shim/drag_rotate.js +66 -0
- package/es/map/handler/shim/two_fingers_touch.d.ts +74 -0
- package/es/map/handler/shim/two_fingers_touch.js +106 -0
- package/es/map/handler/tap_drag_zoom.d.ts +28 -0
- package/es/map/handler/tap_drag_zoom.js +92 -0
- package/es/map/handler/tap_recognizer.d.ts +35 -0
- package/es/map/handler/tap_recognizer.js +107 -0
- package/es/map/handler/tap_zoom.d.ts +28 -0
- package/es/map/handler/tap_zoom.js +87 -0
- package/es/map/handler/touch_pan.d.ts +40 -0
- package/es/map/handler/touch_pan.js +85 -0
- package/es/map/handler/transform-provider.d.ts +23 -0
- package/es/map/handler/transform-provider.js +35 -0
- package/es/map/handler/two_fingers_touch.d.ts +107 -0
- package/es/map/handler/two_fingers_touch.js +289 -0
- package/es/map/handler_inertia.d.ts +20 -0
- package/es/{handler → map}/handler_inertia.js +36 -50
- package/es/map/handler_manager.d.ts +154 -0
- package/es/map/handler_manager.js +466 -0
- package/es/map/map.d.ts +625 -0
- package/es/map/map.js +972 -0
- package/es/map/util/abort_error.d.ts +15 -0
- package/es/map/util/abort_error.js +21 -0
- package/es/map/util/browser.d.ts +10 -0
- package/es/map/util/browser.js +30 -0
- package/es/map/util/dom.d.ts +30 -0
- package/es/map/util/dom.js +105 -0
- package/es/map/util/evented.d.ts +75 -0
- package/es/map/util/evented.js +158 -0
- package/es/map/util/task_queue.d.ts +18 -0
- package/es/map/util/task_queue.js +54 -0
- package/es/map/util/util.d.ts +104 -0
- package/es/map/util/util.js +155 -0
- package/lib/index.d.ts +3 -4
- package/lib/index.js +12 -42
- package/lib/map/camera.d.ts +690 -0
- package/lib/map/camera.js +1145 -0
- package/{es → lib/map}/css/l7.css +41 -7
- package/lib/map/events.d.ts +384 -0
- package/lib/map/events.js +231 -0
- package/lib/map/geo/edge_insets.d.ts +97 -0
- package/lib/{geo → map/geo}/edge_insets.js +56 -35
- package/lib/map/geo/lng_lat.d.ts +116 -0
- package/lib/map/geo/lng_lat.js +166 -0
- package/lib/map/geo/lng_lat_bounds.d.ts +217 -0
- package/lib/map/geo/lng_lat_bounds.js +341 -0
- package/lib/map/geo/mercator_coordinate.d.ts +113 -0
- package/lib/map/geo/mercator_coordinate.js +157 -0
- package/lib/map/geo/transform.d.ts +262 -0
- package/lib/map/geo/transform.js +744 -0
- package/{es → lib/map}/handler/box_zoom.d.ts +30 -24
- package/lib/map/handler/box_zoom.js +153 -0
- package/lib/map/handler/click_zoom.d.ts +24 -0
- package/lib/map/handler/click_zoom.js +54 -0
- package/lib/map/handler/cooperative_gestures.d.ts +40 -0
- package/lib/map/handler/cooperative_gestures.js +101 -0
- package/lib/map/handler/drag_handler.d.ts +88 -0
- package/lib/map/handler/drag_handler.js +97 -0
- package/lib/map/handler/drag_move_state_manager.d.ts +30 -0
- package/lib/map/handler/drag_move_state_manager.js +103 -0
- package/lib/map/handler/handler_util.d.ts +3 -0
- package/lib/{handler → map/handler}/handler_util.js +1 -2
- package/lib/map/handler/keyboard.d.ts +88 -0
- package/lib/map/handler/keyboard.js +205 -0
- package/lib/map/handler/map_event.d.ts +46 -0
- package/lib/map/handler/map_event.js +140 -0
- package/lib/map/handler/mouse.d.ts +30 -0
- package/lib/map/handler/mouse.js +93 -0
- package/lib/map/handler/one_finger_touch_drag.d.ts +15 -0
- package/lib/map/handler/one_finger_touch_drag.js +47 -0
- package/lib/map/handler/scroll_zoom.d.ts +102 -0
- package/lib/map/handler/scroll_zoom.js +320 -0
- package/lib/{handler → map/handler}/shim/dblclick_zoom.d.ts +14 -10
- package/lib/{handler → map/handler}/shim/dblclick_zoom.js +21 -17
- package/lib/map/handler/shim/drag_pan.d.ts +79 -0
- package/lib/map/handler/shim/drag_pan.js +85 -0
- package/lib/{handler → map/handler}/shim/drag_rotate.d.ts +24 -16
- package/lib/map/handler/shim/drag_rotate.js +74 -0
- package/lib/map/handler/shim/two_fingers_touch.d.ts +74 -0
- package/lib/map/handler/shim/two_fingers_touch.js +114 -0
- package/lib/map/handler/tap_drag_zoom.d.ts +28 -0
- package/lib/map/handler/tap_drag_zoom.js +99 -0
- package/lib/map/handler/tap_recognizer.d.ts +35 -0
- package/lib/map/handler/tap_recognizer.js +116 -0
- package/lib/map/handler/tap_zoom.d.ts +28 -0
- package/lib/map/handler/tap_zoom.js +94 -0
- package/lib/map/handler/touch_pan.d.ts +40 -0
- package/lib/map/handler/touch_pan.js +92 -0
- package/lib/map/handler/transform-provider.d.ts +23 -0
- package/lib/map/handler/transform-provider.js +43 -0
- package/lib/map/handler/two_fingers_touch.d.ts +107 -0
- package/lib/map/handler/two_fingers_touch.js +296 -0
- package/lib/map/handler_inertia.d.ts +20 -0
- package/lib/{handler → map}/handler_inertia.js +38 -53
- package/lib/map/handler_manager.d.ts +154 -0
- package/lib/map/handler_manager.js +474 -0
- package/lib/map/map.d.ts +625 -0
- package/lib/map/map.js +979 -0
- package/lib/map/util/abort_error.d.ts +15 -0
- package/lib/map/util/abort_error.js +29 -0
- package/lib/map/util/browser.d.ts +10 -0
- package/lib/map/util/browser.js +36 -0
- package/lib/map/util/dom.d.ts +30 -0
- package/lib/map/util/dom.js +113 -0
- package/lib/map/util/evented.d.ts +75 -0
- package/lib/map/util/evented.js +167 -0
- package/lib/map/util/task_queue.d.ts +18 -0
- package/lib/map/util/task_queue.js +62 -0
- package/lib/map/util/util.d.ts +104 -0
- package/lib/map/util/util.js +171 -0
- package/package.json +6 -3
- package/es/camera.d.ts +0 -86
- package/es/camera.js +0 -639
- package/es/earthmap.d.ts +0 -69
- package/es/earthmap.js +0 -445
- package/es/geo/edge_insets.d.ts +0 -54
- package/es/geo/lng_lat.d.ts +0 -18
- package/es/geo/lng_lat.js +0 -59
- package/es/geo/lng_lat_bounds.d.ts +0 -25
- package/es/geo/lng_lat_bounds.js +0 -118
- package/es/geo/mercator.d.ts +0 -30
- package/es/geo/mercator.js +0 -72
- package/es/geo/point.d.ts +0 -40
- package/es/geo/point.js +0 -153
- package/es/geo/simple.d.ts +0 -30
- package/es/geo/simple.js +0 -75
- package/es/geo/transform.d.ts +0 -198
- package/es/geo/transform.js +0 -895
- package/es/handler/IHandler.d.ts +0 -34
- package/es/handler/IHandler.js +0 -1
- package/es/handler/blockable_map_event.d.ts +0 -17
- package/es/handler/blockable_map_event.js +0 -58
- package/es/handler/box_zoom.js +0 -162
- package/es/handler/click_zoom.d.ts +0 -16
- package/es/handler/click_zoom.js +0 -40
- package/es/handler/events/event.d.ts +0 -4
- package/es/handler/events/event.js +0 -12
- package/es/handler/events/index.d.ts +0 -4
- package/es/handler/events/index.js +0 -4
- package/es/handler/events/map_mouse_event.d.ts +0 -34
- package/es/handler/events/map_mouse_event.js +0 -45
- package/es/handler/events/map_touch_event.d.ts +0 -57
- package/es/handler/events/map_touch_event.js +0 -75
- package/es/handler/events/map_wheel_event.d.ts +0 -33
- package/es/handler/events/map_wheel_event.js +0 -33
- package/es/handler/events/render_event.d.ts +0 -6
- package/es/handler/events/render_event.js +0 -10
- package/es/handler/handler_inertia.d.ts +0 -23
- package/es/handler/handler_manager.d.ts +0 -61
- package/es/handler/handler_manager.js +0 -487
- package/es/handler/handler_util.d.ts +0 -4
- package/es/handler/keyboard.d.ts +0 -36
- package/es/handler/keyboard.js +0 -131
- package/es/handler/map_event.d.ts +0 -29
- package/es/handler/map_event.js +0 -89
- package/es/handler/mouse/index.d.ts +0 -4
- package/es/handler/mouse/index.js +0 -4
- package/es/handler/mouse/mouse_handler.d.ts +0 -22
- package/es/handler/mouse/mouse_handler.js +0 -99
- package/es/handler/mouse/mousepan_handler.d.ts +0 -10
- package/es/handler/mouse/mousepan_handler.js +0 -21
- package/es/handler/mouse/mousepitch_hander.d.ts +0 -9
- package/es/handler/mouse/mousepitch_hander.js +0 -24
- package/es/handler/mouse/mouserotate_hander.d.ts +0 -9
- package/es/handler/mouse/mouserotate_hander.js +0 -24
- package/es/handler/mouse/util.d.ts +0 -6
- package/es/handler/mouse/util.js +0 -12
- package/es/handler/scroll_zoom.d.ts +0 -93
- package/es/handler/scroll_zoom.js +0 -315
- package/es/handler/shim/drag_pan.d.ts +0 -61
- package/es/handler/shim/drag_pan.js +0 -75
- package/es/handler/shim/drag_rotate.js +0 -64
- package/es/handler/shim/touch_zoom_rotate.d.ts +0 -70
- package/es/handler/shim/touch_zoom_rotate.js +0 -104
- package/es/handler/tap/single_tap_recognizer.d.ts +0 -20
- package/es/handler/tap/single_tap_recognizer.js +0 -77
- package/es/handler/tap/tap_drag_zoom.d.ts +0 -22
- package/es/handler/tap/tap_drag_zoom.js +0 -89
- package/es/handler/tap/tap_recognizer.d.ts +0 -17
- package/es/handler/tap/tap_recognizer.js +0 -46
- package/es/handler/tap/tap_zoom.d.ts +0 -22
- package/es/handler/tap/tap_zoom.js +0 -81
- package/es/handler/touch/index.d.ts +0 -5
- package/es/handler/touch/index.js +0 -5
- package/es/handler/touch/touch_pan.d.ts +0 -30
- package/es/handler/touch/touch_pan.js +0 -91
- package/es/handler/touch/touch_pitch.d.ts +0 -13
- package/es/handler/touch/touch_pitch.js +0 -75
- package/es/handler/touch/touch_rotate.d.ts +0 -12
- package/es/handler/touch/touch_rotate.js +0 -57
- package/es/handler/touch/touch_zoom.d.ts +0 -12
- package/es/handler/touch/touch_zoom.js +0 -37
- package/es/handler/touch/two_touch.d.ts +0 -23
- package/es/handler/touch/two_touch.js +0 -98
- package/es/hash.d.ts +0 -14
- package/es/hash.js +0 -121
- package/es/interface.d.ts +0 -34
- package/es/interface.js +0 -1
- package/es/map.d.ts +0 -70
- package/es/map.js +0 -472
- package/es/util.d.ts +0 -25
- package/es/util.js +0 -70
- package/es/utils/Aabb.d.ts +0 -12
- package/es/utils/Aabb.js +0 -72
- package/es/utils/dom.d.ts +0 -4
- package/es/utils/dom.js +0 -117
- package/es/utils/performance.d.ts +0 -17
- package/es/utils/performance.js +0 -58
- package/es/utils/primitives.d.ts +0 -6
- package/es/utils/primitives.js +0 -37
- package/es/utils/task_queue.d.ts +0 -13
- package/es/utils/task_queue.js +0 -60
- package/lib/camera.d.ts +0 -86
- package/lib/camera.js +0 -648
- package/lib/earthmap.d.ts +0 -69
- package/lib/earthmap.js +0 -451
- package/lib/geo/edge_insets.d.ts +0 -54
- package/lib/geo/lng_lat.d.ts +0 -18
- package/lib/geo/lng_lat.js +0 -67
- package/lib/geo/lng_lat_bounds.d.ts +0 -25
- package/lib/geo/lng_lat_bounds.js +0 -126
- package/lib/geo/mercator.d.ts +0 -30
- package/lib/geo/mercator.js +0 -88
- package/lib/geo/point.d.ts +0 -40
- package/lib/geo/point.js +0 -161
- package/lib/geo/simple.d.ts +0 -30
- package/lib/geo/simple.js +0 -92
- package/lib/geo/transform.d.ts +0 -198
- package/lib/geo/transform.js +0 -906
- package/lib/handler/IHandler.d.ts +0 -34
- package/lib/handler/IHandler.js +0 -5
- package/lib/handler/blockable_map_event.d.ts +0 -17
- package/lib/handler/blockable_map_event.js +0 -66
- package/lib/handler/box_zoom.js +0 -168
- package/lib/handler/click_zoom.d.ts +0 -16
- package/lib/handler/click_zoom.js +0 -48
- package/lib/handler/events/event.d.ts +0 -4
- package/lib/handler/events/event.js +0 -20
- package/lib/handler/events/index.d.ts +0 -4
- package/lib/handler/events/index.js +0 -27
- package/lib/handler/events/map_mouse_event.d.ts +0 -34
- package/lib/handler/events/map_mouse_event.js +0 -53
- package/lib/handler/events/map_touch_event.d.ts +0 -57
- package/lib/handler/events/map_touch_event.js +0 -83
- package/lib/handler/events/map_wheel_event.d.ts +0 -33
- package/lib/handler/events/map_wheel_event.js +0 -41
- package/lib/handler/events/render_event.d.ts +0 -6
- package/lib/handler/events/render_event.js +0 -18
- package/lib/handler/handler_inertia.d.ts +0 -23
- package/lib/handler/handler_manager.d.ts +0 -61
- package/lib/handler/handler_manager.js +0 -495
- package/lib/handler/handler_util.d.ts +0 -4
- package/lib/handler/keyboard.d.ts +0 -36
- package/lib/handler/keyboard.js +0 -138
- package/lib/handler/map_event.d.ts +0 -29
- package/lib/handler/map_event.js +0 -97
- package/lib/handler/mouse/index.d.ts +0 -4
- package/lib/handler/mouse/index.js +0 -27
- package/lib/handler/mouse/mouse_handler.d.ts +0 -22
- package/lib/handler/mouse/mouse_handler.js +0 -107
- package/lib/handler/mouse/mousepan_handler.d.ts +0 -10
- package/lib/handler/mouse/mousepan_handler.js +0 -29
- package/lib/handler/mouse/mousepitch_hander.d.ts +0 -9
- package/lib/handler/mouse/mousepitch_hander.js +0 -32
- package/lib/handler/mouse/mouserotate_hander.d.ts +0 -9
- package/lib/handler/mouse/mouserotate_hander.js +0 -32
- package/lib/handler/mouse/util.d.ts +0 -6
- package/lib/handler/mouse/util.js +0 -19
- package/lib/handler/scroll_zoom.d.ts +0 -93
- package/lib/handler/scroll_zoom.js +0 -322
- package/lib/handler/shim/drag_pan.d.ts +0 -61
- package/lib/handler/shim/drag_pan.js +0 -83
- package/lib/handler/shim/drag_rotate.js +0 -72
- package/lib/handler/shim/touch_zoom_rotate.d.ts +0 -70
- package/lib/handler/shim/touch_zoom_rotate.js +0 -112
- package/lib/handler/tap/single_tap_recognizer.d.ts +0 -20
- package/lib/handler/tap/single_tap_recognizer.js +0 -86
- package/lib/handler/tap/tap_drag_zoom.d.ts +0 -22
- package/lib/handler/tap/tap_drag_zoom.js +0 -97
- package/lib/handler/tap/tap_recognizer.d.ts +0 -17
- package/lib/handler/tap/tap_recognizer.js +0 -56
- package/lib/handler/tap/tap_zoom.d.ts +0 -22
- package/lib/handler/tap/tap_zoom.js +0 -89
- package/lib/handler/touch/index.d.ts +0 -5
- package/lib/handler/touch/index.js +0 -34
- package/lib/handler/touch/touch_pan.d.ts +0 -30
- package/lib/handler/touch/touch_pan.js +0 -100
- package/lib/handler/touch/touch_pitch.d.ts +0 -13
- package/lib/handler/touch/touch_pitch.js +0 -83
- package/lib/handler/touch/touch_rotate.d.ts +0 -12
- package/lib/handler/touch/touch_rotate.js +0 -65
- package/lib/handler/touch/touch_zoom.d.ts +0 -12
- package/lib/handler/touch/touch_zoom.js +0 -45
- package/lib/handler/touch/two_touch.d.ts +0 -23
- package/lib/handler/touch/two_touch.js +0 -106
- package/lib/hash.d.ts +0 -14
- package/lib/hash.js +0 -129
- package/lib/interface.d.ts +0 -34
- package/lib/interface.js +0 -5
- package/lib/map.d.ts +0 -70
- package/lib/map.js +0 -478
- package/lib/util.d.ts +0 -25
- package/lib/util.js +0 -89
- package/lib/utils/Aabb.d.ts +0 -12
- package/lib/utils/Aabb.js +0 -80
- package/lib/utils/dom.d.ts +0 -4
- package/lib/utils/dom.js +0 -125
- package/lib/utils/performance.d.ts +0 -17
- package/lib/utils/performance.js +0 -64
- package/lib/utils/primitives.d.ts +0 -6
- package/lib/utils/primitives.js +0 -45
- package/lib/utils/task_queue.d.ts +0 -13
- package/lib/utils/task_queue.js +0 -67
package/es/handler/IHandler.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../earthmap';
|
|
2
|
-
import type Point from '../geo/point';
|
|
3
|
-
import type { Map } from '../map';
|
|
4
|
-
export interface IHandlerResult {
|
|
5
|
-
panDelta?: Point;
|
|
6
|
-
zoomDelta?: number;
|
|
7
|
-
bearingDelta?: number;
|
|
8
|
-
pitchDelta?: number;
|
|
9
|
-
around?: Point | null;
|
|
10
|
-
pinchAround?: Point | null;
|
|
11
|
-
cameraAnimation?: (map: Map | EarthMap) => any;
|
|
12
|
-
originalEvent?: any;
|
|
13
|
-
needsRenderFrame?: boolean;
|
|
14
|
-
noInertia?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface IHandler {
|
|
17
|
-
touchstart?: (e: TouchEvent, points: Point[], mapTouches: Touch[]) => IHandlerResult | void;
|
|
18
|
-
touchmove?: (e: TouchEvent, points: Point[], mapTouches: Touch[]) => IHandlerResult | void;
|
|
19
|
-
touchend?: (e: TouchEvent, points: Point[], mapTouches: Touch[]) => IHandlerResult | void;
|
|
20
|
-
touchcancel?: (e: TouchEvent, points: Point[], mapTouches: Touch[]) => IHandlerResult | void;
|
|
21
|
-
mousedown?: (e: MouseEvent, point: Point) => IHandlerResult | void;
|
|
22
|
-
mousemove?: (e: MouseEvent, point: Point) => IHandlerResult | void;
|
|
23
|
-
mouseup?: (e: MouseEvent, point: Point) => IHandlerResult | void;
|
|
24
|
-
dblclick?: (e: MouseEvent, point: Point) => IHandlerResult | void;
|
|
25
|
-
wheel?: (e: WheelEvent, point: Point) => IHandlerResult | void;
|
|
26
|
-
keydown?: (e: KeyboardEvent) => IHandlerResult | void;
|
|
27
|
-
keyup?: (e: KeyboardEvent) => IHandlerResult | void;
|
|
28
|
-
renderFrame?: () => IHandlerResult | void;
|
|
29
|
-
enable(options?: any): void;
|
|
30
|
-
disable(): void;
|
|
31
|
-
isEnabled(): boolean;
|
|
32
|
-
isActive(): boolean;
|
|
33
|
-
reset(): void;
|
|
34
|
-
}
|
package/es/handler/IHandler.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../earthmap';
|
|
2
|
-
import type { Map } from '../map';
|
|
3
|
-
export default class BlockableMapEventHandler {
|
|
4
|
-
private map;
|
|
5
|
-
private delayContextMenu;
|
|
6
|
-
private contextMenuEvent;
|
|
7
|
-
constructor(map: Map | EarthMap);
|
|
8
|
-
reset(): void;
|
|
9
|
-
mousemove(e: MouseEvent): void;
|
|
10
|
-
mousedown(): void;
|
|
11
|
-
mouseup(): void;
|
|
12
|
-
contextmenu(e: MouseEvent): void;
|
|
13
|
-
isEnabled(): boolean;
|
|
14
|
-
isActive(): boolean;
|
|
15
|
-
enable(): boolean;
|
|
16
|
-
disable(): boolean;
|
|
17
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
|
|
4
|
-
import { MapMouseEvent } from "./events";
|
|
5
|
-
export default class BlockableMapEventHandler {
|
|
6
|
-
constructor(map) {
|
|
7
|
-
_defineProperty(this, "map", void 0);
|
|
8
|
-
_defineProperty(this, "delayContextMenu", void 0);
|
|
9
|
-
_defineProperty(this, "contextMenuEvent", void 0);
|
|
10
|
-
this.map = map;
|
|
11
|
-
}
|
|
12
|
-
reset() {
|
|
13
|
-
this.delayContextMenu = false;
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
delete this.contextMenuEvent;
|
|
16
|
-
}
|
|
17
|
-
mousemove(e) {
|
|
18
|
-
// mousemove map events should not be fired when interaction handlers (pan, rotate, etc) are active
|
|
19
|
-
this.map.emit(e.type, new MapMouseEvent(e.type, this.map, e));
|
|
20
|
-
}
|
|
21
|
-
mousedown() {
|
|
22
|
-
this.delayContextMenu = true;
|
|
23
|
-
}
|
|
24
|
-
mouseup() {
|
|
25
|
-
this.delayContextMenu = false;
|
|
26
|
-
if (this.contextMenuEvent) {
|
|
27
|
-
this.map.emit('contextmenu', new MapMouseEvent('contextmenu', this.map, this.contextMenuEvent));
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
delete this.contextMenuEvent;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
contextmenu(e) {
|
|
33
|
-
if (this.delayContextMenu) {
|
|
34
|
-
// Mac: contextmenu fired on mousedown; we save it until mouseup for consistency's sake
|
|
35
|
-
this.contextMenuEvent = e;
|
|
36
|
-
} else {
|
|
37
|
-
// Windows: contextmenu fired on mouseup, so fire event now
|
|
38
|
-
this.map.emit(e.type, new MapMouseEvent(e.type, this.map, e));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// prevent browser context menu when necessary
|
|
42
|
-
if (this.map.listeners('contextmenu')) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
isEnabled() {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
isActive() {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
enable() {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
disable() {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
}
|
package/es/handler/box_zoom.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
|
|
4
|
-
import DOM from "../utils/dom";
|
|
5
|
-
import { Event } from "./events/event";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The `BoxZoomHandler` allows the user to zoom the map to fit within a bounding box.
|
|
9
|
-
* The bounding box is defined by clicking and holding `shift` while dragging the cursor.
|
|
10
|
-
*/
|
|
11
|
-
class BoxZoomHandler {
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
constructor(map, options) {
|
|
16
|
-
_defineProperty(this, "map", void 0);
|
|
17
|
-
_defineProperty(this, "el", void 0);
|
|
18
|
-
_defineProperty(this, "container", void 0);
|
|
19
|
-
_defineProperty(this, "enabled", void 0);
|
|
20
|
-
_defineProperty(this, "active", void 0);
|
|
21
|
-
_defineProperty(this, "startPos", void 0);
|
|
22
|
-
_defineProperty(this, "lastPos", void 0);
|
|
23
|
-
_defineProperty(this, "box", void 0);
|
|
24
|
-
_defineProperty(this, "clickTolerance", void 0);
|
|
25
|
-
this.map = map;
|
|
26
|
-
this.el = map.getCanvasContainer();
|
|
27
|
-
this.container = map.getContainer();
|
|
28
|
-
this.clickTolerance = options.clickTolerance || 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Returns a Boolean indicating whether the "box zoom" interaction is enabled.
|
|
33
|
-
*
|
|
34
|
-
* @returns {boolean} `true` if the "box zoom" interaction is enabled.
|
|
35
|
-
*/
|
|
36
|
-
isEnabled() {
|
|
37
|
-
return !!this.enabled;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Returns a Boolean indicating whether the "box zoom" interaction is active, i.e. currently being used.
|
|
42
|
-
*
|
|
43
|
-
* @returns {boolean} `true` if the "box zoom" interaction is active.
|
|
44
|
-
*/
|
|
45
|
-
isActive() {
|
|
46
|
-
return !!this.active;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Enables the "box zoom" interaction.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* map.boxZoom.enable();
|
|
54
|
-
*/
|
|
55
|
-
enable() {
|
|
56
|
-
if (this.isEnabled()) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
this.enabled = true;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Disables the "box zoom" interaction.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* map.boxZoom.disable();
|
|
67
|
-
*/
|
|
68
|
-
disable() {
|
|
69
|
-
if (!this.isEnabled()) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
this.enabled = false;
|
|
73
|
-
}
|
|
74
|
-
mousedown(e, point) {
|
|
75
|
-
if (!this.isEnabled()) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (!(e.shiftKey && e.button === 0)) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
DOM.disableDrag();
|
|
82
|
-
this.startPos = this.lastPos = point;
|
|
83
|
-
this.active = true;
|
|
84
|
-
}
|
|
85
|
-
mousemoveWindow(e, point) {
|
|
86
|
-
if (!this.active) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const pos = point;
|
|
90
|
-
if (this.lastPos.equals(pos) || !this.box && pos.dist(this.startPos) < this.clickTolerance) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const p0 = this.startPos;
|
|
94
|
-
this.lastPos = pos;
|
|
95
|
-
if (!this.box) {
|
|
96
|
-
this.box = DOM.create('div', 'l7-boxzoom', this.container);
|
|
97
|
-
this.container.classList.add('l7-crosshair');
|
|
98
|
-
this.fireEvent('boxzoomstart', e);
|
|
99
|
-
}
|
|
100
|
-
const minX = Math.min(p0.x, pos.x);
|
|
101
|
-
const maxX = Math.max(p0.x, pos.x);
|
|
102
|
-
const minY = Math.min(p0.y, pos.y);
|
|
103
|
-
const maxY = Math.max(p0.y, pos.y);
|
|
104
|
-
DOM.setTransform(this.box, `translate(${minX}px,${minY}px)`);
|
|
105
|
-
if (this.box) {
|
|
106
|
-
this.box.style.width = `${maxX - minX}px`;
|
|
107
|
-
this.box.style.height = `${maxY - minY}px`;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
mouseupWindow(e, point) {
|
|
111
|
-
if (!this.active) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (e.button !== 0) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const p0 = this.startPos;
|
|
118
|
-
const p1 = point;
|
|
119
|
-
this.reset();
|
|
120
|
-
DOM.suppressClick();
|
|
121
|
-
if (p0.x === p1.x && p0.y === p1.y) {
|
|
122
|
-
this.fireEvent('boxzoomcancel', e);
|
|
123
|
-
} else {
|
|
124
|
-
this.map.emit('boxzoomend', new Event('boxzoomend', {
|
|
125
|
-
originalEvent: e
|
|
126
|
-
}));
|
|
127
|
-
return {
|
|
128
|
-
cameraAnimation: map => map.fitScreenCoordinates(p0, p1, this.map.getBearing(), {
|
|
129
|
-
linear: true
|
|
130
|
-
})
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
keydown(e) {
|
|
135
|
-
if (!this.active) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (e.keyCode === 27) {
|
|
139
|
-
this.reset();
|
|
140
|
-
this.fireEvent('boxzoomcancel', e);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
reset() {
|
|
144
|
-
this.active = false;
|
|
145
|
-
this.container.classList.remove('l7-crosshair');
|
|
146
|
-
if (this.box) {
|
|
147
|
-
DOM.remove(this.box);
|
|
148
|
-
this.box = null;
|
|
149
|
-
}
|
|
150
|
-
DOM.enableDrag();
|
|
151
|
-
// @ts-ignore
|
|
152
|
-
delete this.startPos;
|
|
153
|
-
// @ts-ignore
|
|
154
|
-
delete this.lastPos;
|
|
155
|
-
}
|
|
156
|
-
fireEvent(type, e) {
|
|
157
|
-
return this.map.emit(type, new Event(type, {
|
|
158
|
-
originalEvent: e
|
|
159
|
-
}));
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
export default BoxZoomHandler;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../earthmap';
|
|
2
|
-
import type Point from '../geo/point';
|
|
3
|
-
import type { Map } from '../map';
|
|
4
|
-
export default class ClickZoomHandler {
|
|
5
|
-
private enabled;
|
|
6
|
-
private active;
|
|
7
|
-
constructor();
|
|
8
|
-
reset(): void;
|
|
9
|
-
dblclick(e: MouseEvent, point: Point): {
|
|
10
|
-
cameraAnimation: (map: Map | EarthMap) => void;
|
|
11
|
-
};
|
|
12
|
-
enable(): void;
|
|
13
|
-
disable(): void;
|
|
14
|
-
isEnabled(): boolean;
|
|
15
|
-
isActive(): boolean;
|
|
16
|
-
}
|
package/es/handler/click_zoom.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
|
|
4
|
-
export default class ClickZoomHandler {
|
|
5
|
-
constructor() {
|
|
6
|
-
_defineProperty(this, "enabled", void 0);
|
|
7
|
-
_defineProperty(this, "active", void 0);
|
|
8
|
-
this.reset();
|
|
9
|
-
}
|
|
10
|
-
reset() {
|
|
11
|
-
this.active = false;
|
|
12
|
-
}
|
|
13
|
-
dblclick(e, point) {
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
return {
|
|
16
|
-
cameraAnimation: map => {
|
|
17
|
-
map.easeTo({
|
|
18
|
-
duration: 300,
|
|
19
|
-
zoom: map.getZoom() + (e.shiftKey ? -1 : 1),
|
|
20
|
-
around: map.unproject(point)
|
|
21
|
-
}, {
|
|
22
|
-
originalEvent: e
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
enable() {
|
|
28
|
-
this.enabled = true;
|
|
29
|
-
}
|
|
30
|
-
disable() {
|
|
31
|
-
this.enabled = false;
|
|
32
|
-
this.reset();
|
|
33
|
-
}
|
|
34
|
-
isEnabled() {
|
|
35
|
-
return this.enabled;
|
|
36
|
-
}
|
|
37
|
-
isActive() {
|
|
38
|
-
return this.active;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { lodashUtil } from '@antv/l7-utils';
|
|
3
|
-
const {
|
|
4
|
-
merge
|
|
5
|
-
} = lodashUtil;
|
|
6
|
-
export class Event {
|
|
7
|
-
constructor(type, data = {}) {
|
|
8
|
-
_defineProperty(this, "type", void 0);
|
|
9
|
-
merge(this, data);
|
|
10
|
-
this.type = type;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../../earthmap';
|
|
2
|
-
import type LngLat from '../../geo/lng_lat';
|
|
3
|
-
import type Point from '../../geo/point';
|
|
4
|
-
import type { Map } from '../../map';
|
|
5
|
-
import { Event } from './event';
|
|
6
|
-
export default class MapMouseEvent extends Event {
|
|
7
|
-
/**
|
|
8
|
-
* `true` if `preventDefault` has been called.
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
type: 'mousedown' | 'mouseup' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseenter' | 'mouseleave' | 'mouseout' | 'contextmenu';
|
|
12
|
-
/**
|
|
13
|
-
* The `Map` object that fired the event.
|
|
14
|
-
*/
|
|
15
|
-
target: Map | EarthMap;
|
|
16
|
-
/**
|
|
17
|
-
* The DOM event which caused the map event.
|
|
18
|
-
*/
|
|
19
|
-
originalEvent: MouseEvent;
|
|
20
|
-
/**
|
|
21
|
-
* The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.
|
|
22
|
-
*/
|
|
23
|
-
point: Point;
|
|
24
|
-
/**
|
|
25
|
-
* The geographic location on the map of the mouse cursor.
|
|
26
|
-
*/
|
|
27
|
-
lngLat: LngLat;
|
|
28
|
-
defaultPrevented: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
constructor(type: string, map: Map | EarthMap, originalEvent: MouseEvent);
|
|
33
|
-
preventDefault(): void;
|
|
34
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
// tslint:disable-next-line:no-submodule-imports
|
|
4
|
-
|
|
5
|
-
import DOM from "../../utils/dom";
|
|
6
|
-
import { Event } from "./event";
|
|
7
|
-
export default class MapMouseEvent extends Event {
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
constructor(type, map, originalEvent) {
|
|
12
|
-
super(type);
|
|
13
|
-
/**
|
|
14
|
-
* `true` if `preventDefault` has been called.
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* The `Map` object that fired the event.
|
|
19
|
-
*/
|
|
20
|
-
_defineProperty(this, "target", void 0);
|
|
21
|
-
/**
|
|
22
|
-
* The DOM event which caused the map event.
|
|
23
|
-
*/
|
|
24
|
-
_defineProperty(this, "originalEvent", void 0);
|
|
25
|
-
/**
|
|
26
|
-
* The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.
|
|
27
|
-
*/
|
|
28
|
-
_defineProperty(this, "point", void 0);
|
|
29
|
-
/**
|
|
30
|
-
* The geographic location on the map of the mouse cursor.
|
|
31
|
-
*/
|
|
32
|
-
_defineProperty(this, "lngLat", void 0);
|
|
33
|
-
_defineProperty(this, "defaultPrevented", void 0);
|
|
34
|
-
const point = DOM.mousePos(map.getCanvasContainer(), originalEvent);
|
|
35
|
-
const lngLat = map.unproject(point);
|
|
36
|
-
this.point = point;
|
|
37
|
-
this.lngLat = lngLat;
|
|
38
|
-
this.originalEvent = originalEvent;
|
|
39
|
-
this.defaultPrevented = false;
|
|
40
|
-
this.target = map;
|
|
41
|
-
}
|
|
42
|
-
preventDefault() {
|
|
43
|
-
this.defaultPrevented = true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../../earthmap';
|
|
2
|
-
import type LngLat from '../../geo/lng_lat';
|
|
3
|
-
import Point from '../../geo/point';
|
|
4
|
-
import type { Map } from '../../map';
|
|
5
|
-
import { Event } from './event';
|
|
6
|
-
export default class MapTouchEvent extends Event {
|
|
7
|
-
/**
|
|
8
|
-
* The event type.
|
|
9
|
-
*/
|
|
10
|
-
type: 'touchstart' | 'touchend' | 'touchcancel';
|
|
11
|
-
/**
|
|
12
|
-
* The `Map` object that fired the event.
|
|
13
|
-
*/
|
|
14
|
-
target: Map | EarthMap;
|
|
15
|
-
/**
|
|
16
|
-
* The DOM event which caused the map event.
|
|
17
|
-
*/
|
|
18
|
-
originalEvent: TouchEvent;
|
|
19
|
-
/**
|
|
20
|
-
* The geographic location on the map of the center of the touch event points.
|
|
21
|
-
*/
|
|
22
|
-
lngLat: LngLat;
|
|
23
|
-
/**
|
|
24
|
-
* The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left
|
|
25
|
-
* corner.
|
|
26
|
-
*/
|
|
27
|
-
point: Point;
|
|
28
|
-
/**
|
|
29
|
-
* The array of pixel coordinates corresponding to a
|
|
30
|
-
* [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
|
|
31
|
-
*/
|
|
32
|
-
points: Point[];
|
|
33
|
-
/**
|
|
34
|
-
* The geographical locations on the map corresponding to a
|
|
35
|
-
* [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
|
|
36
|
-
*/
|
|
37
|
-
lngLats: LngLat[];
|
|
38
|
-
/**
|
|
39
|
-
* `true` if `preventDefault` has been called.
|
|
40
|
-
* @private
|
|
41
|
-
*/
|
|
42
|
-
defaultPrevented: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
constructor(type: string, map: Map | EarthMap, originalEvent: TouchEvent);
|
|
47
|
-
/**
|
|
48
|
-
* Prevents subsequent default processing of the event by the map.
|
|
49
|
-
*
|
|
50
|
-
* Calling this method will prevent the following default map behaviors:
|
|
51
|
-
*
|
|
52
|
-
* * On `touchstart` events, the behavior of {@link DragPanHandler}
|
|
53
|
-
* * On `touchstart` events, the behavior of {@link TouchZoomRotateHandler}
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
private preventDefault;
|
|
57
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
|
|
4
|
-
import Point from "../../geo/point";
|
|
5
|
-
import DOM from "../../utils/dom";
|
|
6
|
-
import { Event } from "./event";
|
|
7
|
-
export default class MapTouchEvent extends Event {
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
constructor(type, map, originalEvent) {
|
|
12
|
-
super(type);
|
|
13
|
-
/**
|
|
14
|
-
* The event type.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* The `Map` object that fired the event.
|
|
18
|
-
*/
|
|
19
|
-
_defineProperty(this, "target", void 0);
|
|
20
|
-
/**
|
|
21
|
-
* The DOM event which caused the map event.
|
|
22
|
-
*/
|
|
23
|
-
_defineProperty(this, "originalEvent", void 0);
|
|
24
|
-
/**
|
|
25
|
-
* The geographic location on the map of the center of the touch event points.
|
|
26
|
-
*/
|
|
27
|
-
_defineProperty(this, "lngLat", void 0);
|
|
28
|
-
/**
|
|
29
|
-
* The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left
|
|
30
|
-
* corner.
|
|
31
|
-
*/
|
|
32
|
-
_defineProperty(this, "point", void 0);
|
|
33
|
-
/**
|
|
34
|
-
* The array of pixel coordinates corresponding to a
|
|
35
|
-
* [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
|
|
36
|
-
*/
|
|
37
|
-
_defineProperty(this, "points", void 0);
|
|
38
|
-
/**
|
|
39
|
-
* The geographical locations on the map corresponding to a
|
|
40
|
-
* [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
|
|
41
|
-
*/
|
|
42
|
-
_defineProperty(this, "lngLats", void 0);
|
|
43
|
-
/**
|
|
44
|
-
* `true` if `preventDefault` has been called.
|
|
45
|
-
* @private
|
|
46
|
-
*/
|
|
47
|
-
_defineProperty(this, "defaultPrevented", void 0);
|
|
48
|
-
const touches = type === 'touchend' ? originalEvent.changedTouches : originalEvent.touches;
|
|
49
|
-
const points = DOM.touchPos(map.getCanvasContainer(), touches);
|
|
50
|
-
const lngLats = points.map(t => map.unproject(t));
|
|
51
|
-
const point = points.reduce((prev, curr, i, arr) => {
|
|
52
|
-
return prev.add(curr.div(arr.length));
|
|
53
|
-
}, new Point(0, 0));
|
|
54
|
-
const lngLat = map.unproject(point);
|
|
55
|
-
this.points = points;
|
|
56
|
-
this.point = point;
|
|
57
|
-
this.lngLats = lngLats;
|
|
58
|
-
this.lngLat = lngLat;
|
|
59
|
-
this.originalEvent = originalEvent;
|
|
60
|
-
this.defaultPrevented = false;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Prevents subsequent default processing of the event by the map.
|
|
65
|
-
*
|
|
66
|
-
* Calling this method will prevent the following default map behaviors:
|
|
67
|
-
*
|
|
68
|
-
* * On `touchstart` events, the behavior of {@link DragPanHandler}
|
|
69
|
-
* * On `touchstart` events, the behavior of {@link TouchZoomRotateHandler}
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
preventDefault() {
|
|
73
|
-
this.defaultPrevented = true;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { EarthMap } from '../../earthmap';
|
|
2
|
-
import type { Map } from '../../map';
|
|
3
|
-
import { Event } from './event';
|
|
4
|
-
export interface IMapBoxZoomEvent {
|
|
5
|
-
type: 'boxzoomstart' | 'boxzoomend' | 'boxzoomcancel';
|
|
6
|
-
target: Map | EarthMap;
|
|
7
|
-
originalEvent: MouseEvent;
|
|
8
|
-
}
|
|
9
|
-
export default class MapWheelEvent extends Event {
|
|
10
|
-
/**
|
|
11
|
-
* The event type.
|
|
12
|
-
*/
|
|
13
|
-
type: 'wheel';
|
|
14
|
-
/**
|
|
15
|
-
* The DOM event which caused the map event.
|
|
16
|
-
*/
|
|
17
|
-
originalEvent: WheelEvent;
|
|
18
|
-
defaultPrevented: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The `Map` object that fired the event.
|
|
21
|
-
*/
|
|
22
|
-
target: Map | EarthMap;
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
constructor(type: string, map: Map | EarthMap, originalEvent: WheelEvent);
|
|
27
|
-
/**
|
|
28
|
-
* Prevents subsequent default processing of the event by the map.
|
|
29
|
-
*
|
|
30
|
-
* Calling this method will prevent the the behavior of {@link ScrollZoomHandler}.
|
|
31
|
-
*/
|
|
32
|
-
private preventDefault;
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { Event } from "./event";
|
|
3
|
-
export default class MapWheelEvent extends Event {
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
*/
|
|
7
|
-
constructor(type, map, originalEvent) {
|
|
8
|
-
super(type);
|
|
9
|
-
/**
|
|
10
|
-
* The event type.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* The DOM event which caused the map event.
|
|
14
|
-
*/
|
|
15
|
-
_defineProperty(this, "originalEvent", void 0);
|
|
16
|
-
_defineProperty(this, "defaultPrevented", void 0);
|
|
17
|
-
/**
|
|
18
|
-
* The `Map` object that fired the event.
|
|
19
|
-
*/
|
|
20
|
-
_defineProperty(this, "target", void 0);
|
|
21
|
-
this.originalEvent = originalEvent;
|
|
22
|
-
this.defaultPrevented = false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Prevents subsequent default processing of the event by the map.
|
|
27
|
-
*
|
|
28
|
-
* Calling this method will prevent the the behavior of {@link ScrollZoomHandler}.
|
|
29
|
-
*/
|
|
30
|
-
preventDefault() {
|
|
31
|
-
this.defaultPrevented = true;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { Event } from "./event";
|
|
3
|
-
export default class RenderFrameEvent extends Event {
|
|
4
|
-
constructor(type, timeStamp) {
|
|
5
|
-
super(type);
|
|
6
|
-
_defineProperty(this, "type", 'renderFrame');
|
|
7
|
-
_defineProperty(this, "timeStamp", void 0);
|
|
8
|
-
this.timeStamp = timeStamp;
|
|
9
|
-
}
|
|
10
|
-
}
|