@antv/l7-map 2.19.7 → 2.19.8
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/es/handler/handler_manager.d.ts +1 -1
- package/es/handler/mouse/index.d.ts +1 -1
- package/es/handler/mouse/index.js +1 -1
- package/es/map.js +21 -4
- package/lib/map.js +21 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EarthMap } from '../earthmap';
|
|
2
2
|
import { Map } from '../map';
|
|
3
|
-
import RenderFrameEvent from './events/render_event';
|
|
4
3
|
import { IHandlerResult } from './IHandler';
|
|
4
|
+
import RenderFrameEvent from './events/render_event';
|
|
5
5
|
export type InputEvent = MouseEvent | TouchEvent | KeyboardEvent | WheelEvent;
|
|
6
6
|
export interface IHandlerOptions {
|
|
7
7
|
interactive: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import MousePanHandler from './mousepan_handler';
|
|
2
2
|
import MouseRotateHandler from './mousepitch_hander';
|
|
3
3
|
import MousePitchHandler from './mouserotate_hander';
|
|
4
|
-
export { MousePanHandler,
|
|
4
|
+
export { MousePanHandler, MousePitchHandler, MouseRotateHandler };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import MousePanHandler from "./mousepan_handler";
|
|
2
2
|
import MouseRotateHandler from "./mousepitch_hander";
|
|
3
3
|
import MousePitchHandler from "./mouserotate_hander";
|
|
4
|
-
export { MousePanHandler,
|
|
4
|
+
export { MousePanHandler, MousePitchHandler, MouseRotateHandler };
|
package/es/map.js
CHANGED
|
@@ -50,6 +50,23 @@ import Hash from "./hash";
|
|
|
50
50
|
import { renderframe } from "./util";
|
|
51
51
|
import { PerformanceUtils } from "./utils/performance";
|
|
52
52
|
import TaskQueue from "./utils/task_queue";
|
|
53
|
+
(function () {
|
|
54
|
+
if (typeof window.CustomEvent === "function") return false; //If not IE
|
|
55
|
+
|
|
56
|
+
function CustomEvent(event, params) {
|
|
57
|
+
params = params || {
|
|
58
|
+
bubbles: false,
|
|
59
|
+
cancelable: false,
|
|
60
|
+
detail: undefined
|
|
61
|
+
};
|
|
62
|
+
var evt = document.createEvent('CustomEvent');
|
|
63
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
64
|
+
return evt;
|
|
65
|
+
}
|
|
66
|
+
CustomEvent.prototype = window.Event.prototype;
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
window.CustomEvent = CustomEvent;
|
|
69
|
+
})();
|
|
53
70
|
var defaultMinZoom = -2;
|
|
54
71
|
var defaultMaxZoom = 22;
|
|
55
72
|
var merge = lodashUtil.merge;
|
|
@@ -144,12 +161,12 @@ export var Map = /*#__PURE__*/function (_Camera) {
|
|
|
144
161
|
var fireMoving = !this.moving;
|
|
145
162
|
if (fireMoving) {
|
|
146
163
|
this.stop();
|
|
147
|
-
this.emit('movestart', new window.
|
|
148
|
-
this.emit('move', new window.
|
|
164
|
+
this.emit('movestart', new window.CustomEvent('movestart', eventData));
|
|
165
|
+
this.emit('move', new window.CustomEvent('move', eventData));
|
|
149
166
|
}
|
|
150
|
-
this.emit('resize', new window.
|
|
167
|
+
this.emit('resize', new window.CustomEvent('resize', eventData));
|
|
151
168
|
if (fireMoving) {
|
|
152
|
-
this.emit('moveend', new window.
|
|
169
|
+
this.emit('moveend', new window.CustomEvent('moveend', eventData));
|
|
153
170
|
}
|
|
154
171
|
return this;
|
|
155
172
|
}
|
package/lib/map.js
CHANGED
|
@@ -56,6 +56,23 @@ function loadStyles(css, doc) {
|
|
|
56
56
|
return style;
|
|
57
57
|
}
|
|
58
58
|
loadStyles(".l7-map {\n font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;\n overflow: hidden;\n position: relative;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.l7-canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.l7-map:-webkit-full-screen {\n width: 100%;\n height: 100%;\n}\n\n.l7-canary {\n background-color: salmon;\n}\n\n.l7-canvas-container.l7-interactive,\n.l7-ctrl-group button.l7-ctrl-compass {\n cursor: -webkit-grab;\n cursor: grab;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.l7-canvas-container.l7-interactive.l7-track-pointer {\n cursor: pointer;\n}\n\n.l7-canvas-container.l7-interactive:active,\n.l7-ctrl-group button.l7-ctrl-compass:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate,\n.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas {\n -ms-touch-action: pan-x pan-y;\n touch-action: pan-x pan-y;\n}\n\n.l7-canvas-container.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: pinch-zoom;\n touch-action: pinch-zoom;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: none;\n touch-action: none;\n}\n\n.l7-ctrl-top-left,\n.l7-ctrl-top-right,\n.l7-ctrl-bottom-left,\n.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; }\n.l7-ctrl-top-left { top: 0; left: 0; }\n.l7-ctrl-top-right { top: 0; right: 0; }\n.l7-ctrl-bottom-left { bottom: 0; left: 0; }\n.l7-ctrl-bottom-right { right: 0; bottom: 0; }\n\n.l7-ctrl {\n clear: both;\n pointer-events: auto;\n\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.l7-ctrl-top-left .l7-ctrl { margin: 10px 0 0 10px; float: left; }\n.l7-ctrl-top-right .l7-ctrl { margin: 10px 10px 0 0; float: right; }\n.l7-ctrl-bottom-left .l7-ctrl { margin: 0 0 10px 10px; float: left; }\n.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; }\n\n\n.l7-crosshair,\n.l7-crosshair .l7-interactive,\n.l7-crosshair .l7-interactive:active {\n cursor: crosshair;\n}\n\n.l7-boxzoom {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n background: #fff;\n border: 2px dotted #202020;\n opacity: 0.5;\n z-index: 10;\n}\n"); // @ts-ignore
|
|
59
|
+
(function () {
|
|
60
|
+
if (typeof window.CustomEvent === "function") return false; //If not IE
|
|
61
|
+
|
|
62
|
+
function CustomEvent(event, params) {
|
|
63
|
+
params = params || {
|
|
64
|
+
bubbles: false,
|
|
65
|
+
cancelable: false,
|
|
66
|
+
detail: undefined
|
|
67
|
+
};
|
|
68
|
+
var evt = document.createEvent('CustomEvent');
|
|
69
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
70
|
+
return evt;
|
|
71
|
+
}
|
|
72
|
+
CustomEvent.prototype = window.Event.prototype;
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
window.CustomEvent = CustomEvent;
|
|
75
|
+
})();
|
|
59
76
|
var defaultMinZoom = -2;
|
|
60
77
|
var defaultMaxZoom = 22;
|
|
61
78
|
var merge = _l7Utils.lodashUtil.merge;
|
|
@@ -150,12 +167,12 @@ var Map = /*#__PURE__*/function (_Camera) {
|
|
|
150
167
|
var fireMoving = !this.moving;
|
|
151
168
|
if (fireMoving) {
|
|
152
169
|
this.stop();
|
|
153
|
-
this.emit('movestart', new window.
|
|
154
|
-
this.emit('move', new window.
|
|
170
|
+
this.emit('movestart', new window.CustomEvent('movestart', eventData));
|
|
171
|
+
this.emit('move', new window.CustomEvent('move', eventData));
|
|
155
172
|
}
|
|
156
|
-
this.emit('resize', new window.
|
|
173
|
+
this.emit('resize', new window.CustomEvent('resize', eventData));
|
|
157
174
|
if (fireMoving) {
|
|
158
|
-
this.emit('moveend', new window.
|
|
175
|
+
this.emit('moveend', new window.CustomEvent('moveend', eventData));
|
|
159
176
|
}
|
|
160
177
|
return this;
|
|
161
178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-map",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.8",
|
|
4
4
|
"description": "l7 map",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "thinkinggis <lzx199065@gmail.com>",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/antvis/L7#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@antv/l7-utils": "2.19.
|
|
43
|
+
"@antv/l7-utils": "2.19.8",
|
|
44
44
|
"@babel/runtime": "^7.7.7",
|
|
45
45
|
"@mapbox/point-geometry": "^0.1.0",
|
|
46
46
|
"@mapbox/unitbezier": "^0.0.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"gl-matrix": "^3.1.0",
|
|
49
49
|
"lodash-es": "^4.17.21"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9111d4c9dcbeca5df641a994215c062e5b209311"
|
|
52
52
|
}
|