@antv/l7-map 2.9.22-alpha.0 → 2.9.24

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.
@@ -48,6 +48,7 @@ var LngLatBounds = /*#__PURE__*/function () {
48
48
  }
49
49
  } else {
50
50
  if (Array.isArray(obj)) {
51
+ //@ts-ignore
51
52
  if (obj.length === 4 || obj.every(Array.isArray)) {
52
53
  var lngLatBoundsObj = obj;
53
54
  return this.extend(LngLatBounds.convert(lngLatBoundsObj));
@@ -1,5 +1,5 @@
1
1
  import { Event } from './event';
2
2
  export default class RenderFrameEvent extends Event {
3
- type: 'renderFrame';
3
+ type: string;
4
4
  timeStamp: number;
5
5
  }
@@ -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 | undefined) => void;
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
- delete this.lastPoint;
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
- delete this.centroid;
52
- delete this.startTime;
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
- delete this.swipePoint;
23
- delete this.swipeTouch;
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
- delete this.firstMove;
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
  }, {
@@ -14,7 +14,8 @@ var TwoTouchHandler = /*#__PURE__*/function () {
14
14
  _createClass(TwoTouchHandler, [{
15
15
  key: "reset",
16
16
  value: function reset() {
17
- this.active = false;
17
+ this.active = false; //@ts-ignore
18
+
18
19
  delete this.firstTwoTouches;
19
20
  }
20
21
  }, {
package/es/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './map';
2
2
  export * from './earthmap';
3
+ export * from './interface';
package/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./map";
2
- export * from "./earthmap";
2
+ export * from "./earthmap";
3
+ export * from "./interface";
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 dimensions = this.containerDimensions();
176
- var width = dimensions[0];
177
- var height = dimensions[1];
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
@@ -18,3 +18,4 @@ var src_exports = {};
18
18
  module.exports = __toCommonJS(src_exports);
19
19
  __reExport(src_exports, require("./map"), module.exports);
20
20
  __reExport(src_exports, require("./earthmap"), module.exports);
21
+ __reExport(src_exports, require("./interface"), module.exports);
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 dimensions = this.containerDimensions();
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.22-alpha.0",
3
+ "version": "2.9.24",
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.22-alpha.0",
42
+ "@antv/l7-utils": "2.9.24",
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": "df0d36c7370eaa2712be99e81b558cfb4f1d8322"
50
+ "gitHead": "0d84d477dc449e4541bdcaabbb29e6765d37b079"
51
51
  }