@antv/l7-map 2.9.22 → 2.9.25-alpha.0
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/geo/lng_lat_bounds.js +1 -0
- package/es/handler/events/render_event.d.ts +1 -1
- package/es/handler/handler_manager.d.ts +1 -1
- package/es/handler/mouse/mouse_handler.js +4 -2
- package/es/handler/tap/single_tap_recognizer.js +5 -2
- package/es/handler/tap/tap_drag_zoom.js +6 -3
- package/es/handler/tap/tap_recognizer.js +2 -1
- package/es/handler/touch/touch_pitch.js +4 -2
- package/es/handler/touch/touch_rotate.js +6 -3
- package/es/handler/touch/touch_zoom.js +4 -2
- package/es/handler/touch/two_touch.js +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/map.js +8 -3
- package/lib/index.js +1 -0
- package/lib/map.js +3 -3
- package/package.json +3 -3
package/es/geo/lng_lat_bounds.js
CHANGED
|
@@ -44,7 +44,7 @@ declare class HandlerManager {
|
|
|
44
44
|
isRotating(): boolean;
|
|
45
45
|
isMoving(): boolean;
|
|
46
46
|
handleWindowEvent: (e: InputEvent) => void;
|
|
47
|
-
handleEvent: (e: InputEvent | RenderFrameEvent, eventName?: string
|
|
47
|
+
handleEvent: (e: InputEvent | RenderFrameEvent, eventName?: string) => void;
|
|
48
48
|
mergeIHandlerResult(mergedIHandlerResult: IHandlerResult, eventsInProgress: {
|
|
49
49
|
[key: string]: any;
|
|
50
50
|
}, HandlerResult: IHandlerResult, name: string, e?: InputEvent): void;
|
|
@@ -16,8 +16,10 @@ var MouseHandler = /*#__PURE__*/function () {
|
|
|
16
16
|
key: "reset",
|
|
17
17
|
value: function reset() {
|
|
18
18
|
this.active = false;
|
|
19
|
-
this.moved = false;
|
|
20
|
-
|
|
19
|
+
this.moved = false; //@ts-ignore
|
|
20
|
+
|
|
21
|
+
delete this.lastPoint; //@ts-ignore
|
|
22
|
+
|
|
21
23
|
delete this.eventButton;
|
|
22
24
|
}
|
|
23
25
|
}, {
|
|
@@ -48,8 +48,11 @@ var SingleTapRecognizer = /*#__PURE__*/function () {
|
|
|
48
48
|
_createClass(SingleTapRecognizer, [{
|
|
49
49
|
key: "reset",
|
|
50
50
|
value: function reset() {
|
|
51
|
-
|
|
52
|
-
delete this.
|
|
51
|
+
//@ts-ignore
|
|
52
|
+
delete this.centroid; //@ts-ignore
|
|
53
|
+
|
|
54
|
+
delete this.startTime; //@ts-ignore
|
|
55
|
+
|
|
53
56
|
delete this.touches;
|
|
54
57
|
this.aborted = false;
|
|
55
58
|
}
|
|
@@ -18,9 +18,12 @@ var TapDragZoomHandler = /*#__PURE__*/function () {
|
|
|
18
18
|
_createClass(TapDragZoomHandler, [{
|
|
19
19
|
key: "reset",
|
|
20
20
|
value: function reset() {
|
|
21
|
-
this.active = false;
|
|
22
|
-
|
|
23
|
-
delete this.
|
|
21
|
+
this.active = false; //@ts-ignore
|
|
22
|
+
|
|
23
|
+
delete this.swipePoint; //@ts-ignore
|
|
24
|
+
|
|
25
|
+
delete this.swipeTouch; //@ts-ignore
|
|
26
|
+
|
|
24
27
|
delete this.tapTime;
|
|
25
28
|
this.tap.reset();
|
|
26
29
|
}
|
|
@@ -15,7 +15,8 @@ var TapRecognizer = /*#__PURE__*/function () {
|
|
|
15
15
|
_createClass(TapRecognizer, [{
|
|
16
16
|
key: "reset",
|
|
17
17
|
value: function reset() {
|
|
18
|
-
this.lastTime = Infinity;
|
|
18
|
+
this.lastTime = Infinity; //@ts-ignore
|
|
19
|
+
|
|
19
20
|
delete this.lastTap;
|
|
20
21
|
this.count = 0;
|
|
21
22
|
this.singleTap.reset();
|
|
@@ -34,8 +34,10 @@ var TouchPitchHandler = /*#__PURE__*/function (_TwoTouchHandler) {
|
|
|
34
34
|
value: function reset() {
|
|
35
35
|
_get(_getPrototypeOf(TouchPitchHandler.prototype), "reset", this).call(this);
|
|
36
36
|
|
|
37
|
-
this.valid = undefined;
|
|
38
|
-
|
|
37
|
+
this.valid = undefined; //@ts-ignore
|
|
38
|
+
|
|
39
|
+
delete this.firstMove; //@ts-ignore
|
|
40
|
+
|
|
39
41
|
delete this.lastPoints;
|
|
40
42
|
}
|
|
41
43
|
}, {
|
|
@@ -31,10 +31,13 @@ var TouchRotateHandler = /*#__PURE__*/function (_TwoTouchHandler) {
|
|
|
31
31
|
_createClass(TouchRotateHandler, [{
|
|
32
32
|
key: "reset",
|
|
33
33
|
value: function reset() {
|
|
34
|
-
_get(_getPrototypeOf(TouchRotateHandler.prototype), "reset", this).call(this);
|
|
34
|
+
_get(_getPrototypeOf(TouchRotateHandler.prototype), "reset", this).call(this); //@ts-ignore
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
delete this.minDiameter; //@ts-ignore
|
|
38
|
+
|
|
39
|
+
delete this.startVector; //@ts-ignore
|
|
35
40
|
|
|
36
|
-
delete this.minDiameter;
|
|
37
|
-
delete this.startVector;
|
|
38
41
|
delete this.vector;
|
|
39
42
|
}
|
|
40
43
|
}, {
|
|
@@ -31,9 +31,11 @@ var TouchZoomHandler = /*#__PURE__*/function (_TwoTouchHandler) {
|
|
|
31
31
|
_createClass(TouchZoomHandler, [{
|
|
32
32
|
key: "reset",
|
|
33
33
|
value: function reset() {
|
|
34
|
-
_get(_getPrototypeOf(TouchZoomHandler.prototype), "reset", this).call(this);
|
|
34
|
+
_get(_getPrototypeOf(TouchZoomHandler.prototype), "reset", this).call(this); //@ts-ignore
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
delete this.distance; //@ts-ignore
|
|
35
38
|
|
|
36
|
-
delete this.distance;
|
|
37
39
|
delete this.startDistance;
|
|
38
40
|
}
|
|
39
41
|
}, {
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/map.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -172,9 +173,11 @@ export var Map = /*#__PURE__*/function (_Camera) {
|
|
|
172
173
|
_createClass(Map, [{
|
|
173
174
|
key: "resize",
|
|
174
175
|
value: function resize(eventData) {
|
|
175
|
-
var
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
var _this$containerDimens = this.containerDimensions(),
|
|
177
|
+
_this$containerDimens2 = _slicedToArray(_this$containerDimens, 2),
|
|
178
|
+
width = _this$containerDimens2[0],
|
|
179
|
+
height = _this$containerDimens2[1];
|
|
180
|
+
|
|
178
181
|
this.transform.resize(width, height); // TODO: 小程序环境不需要执行后续动作
|
|
179
182
|
|
|
180
183
|
if (isMini) {
|
|
@@ -447,6 +450,8 @@ export var Map = /*#__PURE__*/function (_Camera) {
|
|
|
447
450
|
} else {
|
|
448
451
|
width = this.container.clientWidth;
|
|
449
452
|
height = this.container.clientHeight;
|
|
453
|
+
width = width == 0 ? 400 : width;
|
|
454
|
+
height = height === 0 ? 300 : height;
|
|
450
455
|
}
|
|
451
456
|
}
|
|
452
457
|
|
package/lib/index.js
CHANGED
package/lib/map.js
CHANGED
|
@@ -113,9 +113,7 @@ var Map = class extends import_camera.default {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
resize(eventData) {
|
|
116
|
-
const
|
|
117
|
-
const width = dimensions[0];
|
|
118
|
-
const height = dimensions[1];
|
|
116
|
+
const [width, height] = this.containerDimensions();
|
|
119
117
|
this.transform.resize(width, height);
|
|
120
118
|
if (import_l7_utils.isMini) {
|
|
121
119
|
return this;
|
|
@@ -297,6 +295,8 @@ var Map = class extends import_camera.default {
|
|
|
297
295
|
} else {
|
|
298
296
|
width = this.container.clientWidth;
|
|
299
297
|
height = this.container.clientHeight;
|
|
298
|
+
width = width == 0 ? 400 : width;
|
|
299
|
+
height = height === 0 ? 300 : height;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
return [width, height];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-map",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.25-alpha.0",
|
|
4
4
|
"description": "l7 map",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "thinkinggis <lzx199065@gmail.com>",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/antvis/L7#readme",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@antv/l7-utils": "2.9.
|
|
42
|
+
"@antv/l7-utils": "2.9.25-alpha.0",
|
|
43
43
|
"@babel/runtime": "^7.7.7",
|
|
44
44
|
"@mapbox/point-geometry": "^0.1.0",
|
|
45
45
|
"@mapbox/unitbezier": "^0.0.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"gl-matrix": "^3.1.0",
|
|
48
48
|
"lodash": "^4.17.15"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "5216ad73535dbd3c4188dd9717952db3dfcb4f71"
|
|
51
51
|
}
|