@antv/l7-map 2.20.20 → 2.21.1

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.
@@ -1,10 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _BUTTONS_FLAGS;
3
2
  export var LEFT_BUTTON = 0;
4
3
  export var RIGHT_BUTTON = 2;
5
4
 
6
5
  // the values for each button in MouseEvent.buttons
7
- export var BUTTONS_FLAGS = (_BUTTONS_FLAGS = {}, _defineProperty(_BUTTONS_FLAGS, LEFT_BUTTON, 1), _defineProperty(_BUTTONS_FLAGS, RIGHT_BUTTON, 2), _BUTTONS_FLAGS);
6
+ export var BUTTONS_FLAGS = _defineProperty(_defineProperty({}, LEFT_BUTTON, 1), RIGHT_BUTTON, 2);
8
7
  export function buttonStillPressed(e, button) {
9
8
  var flag = BUTTONS_FLAGS[button];
10
9
  return e.buttons === undefined || (e.buttons & flag) !== flag;
@@ -36,8 +36,6 @@ var TwoTouchHandler = /*#__PURE__*/function () {
36
36
  }, {
37
37
  key: "touchstart",
38
38
  value: function touchstart(e, points, mapTouches) {
39
- // console.log(e.target, e.targetTouches.length ? e.targetTouches[0].target : null);
40
- // log('touchstart', points, e.target.innerHTML, e.targetTouches.length ? e.targetTouches[0].target.innerHTML: undefined);
41
39
  if (this.firstTwoTouches || mapTouches.length < 2) {
42
40
  return;
43
41
  }
package/es/map.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare class Map extends Camera {
40
40
  getContainer(): HTMLElement;
41
41
  getCanvas(): HTMLCanvasElement;
42
42
  getCanvasContainer(): HTMLElement;
43
+ getCanvasOverlays(): HTMLElement;
43
44
  project(lngLat: LngLatLike): Point;
44
45
  unproject(point: PointLike): LngLat;
45
46
  getBounds(): LngLatBounds;
package/es/map.js CHANGED
@@ -186,6 +186,11 @@ export var Map = /*#__PURE__*/function (_Camera) {
186
186
  value: function getCanvasContainer() {
187
187
  return this.canvasContainer;
188
188
  }
189
+ }, {
190
+ key: "getCanvasOverlays",
191
+ value: function getCanvasOverlays() {
192
+ return this.getCanvasContainer();
193
+ }
189
194
  }, {
190
195
  key: "project",
191
196
  value: function project(lngLat) {
@@ -31,7 +31,6 @@ var Frustum = /*#__PURE__*/function () {
31
31
  // bottom
32
32
  [0, 4, 5] // top
33
33
  ];
34
-
35
34
  var frustumPlanes = frustumPlanePointIndices.map(function (p) {
36
35
  var a = vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[0]]), new Float32Array(frustumCoords[p[1]]));
37
36
  var b = vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[2]]), new Float32Array(frustumCoords[p[1]]));
@@ -7,12 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.RIGHT_BUTTON = exports.LEFT_BUTTON = exports.BUTTONS_FLAGS = void 0;
8
8
  exports.buttonStillPressed = buttonStillPressed;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _BUTTONS_FLAGS;
11
10
  var LEFT_BUTTON = exports.LEFT_BUTTON = 0;
12
11
  var RIGHT_BUTTON = exports.RIGHT_BUTTON = 2;
13
12
 
14
13
  // the values for each button in MouseEvent.buttons
15
- var BUTTONS_FLAGS = exports.BUTTONS_FLAGS = (_BUTTONS_FLAGS = {}, (0, _defineProperty2.default)(_BUTTONS_FLAGS, LEFT_BUTTON, 1), (0, _defineProperty2.default)(_BUTTONS_FLAGS, RIGHT_BUTTON, 2), _BUTTONS_FLAGS);
14
+ var BUTTONS_FLAGS = exports.BUTTONS_FLAGS = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, LEFT_BUTTON, 1), RIGHT_BUTTON, 2);
16
15
  function buttonStillPressed(e, button) {
17
16
  var flag = BUTTONS_FLAGS[button];
18
17
  return e.buttons === undefined || (e.buttons & flag) !== flag;
@@ -42,8 +42,6 @@ var TwoTouchHandler = exports.default = /*#__PURE__*/function () {
42
42
  }, {
43
43
  key: "touchstart",
44
44
  value: function touchstart(e, points, mapTouches) {
45
- // console.log(e.target, e.targetTouches.length ? e.targetTouches[0].target : null);
46
- // log('touchstart', points, e.target.innerHTML, e.targetTouches.length ? e.targetTouches[0].target.innerHTML: undefined);
47
45
  if (this.firstTwoTouches || mapTouches.length < 2) {
48
46
  return;
49
47
  }
package/lib/map.js CHANGED
@@ -191,6 +191,11 @@ var Map = exports.Map = /*#__PURE__*/function (_Camera) {
191
191
  value: function getCanvasContainer() {
192
192
  return this.canvasContainer;
193
193
  }
194
+ }, {
195
+ key: "getCanvasOverlays",
196
+ value: function getCanvasOverlays() {
197
+ return this.getCanvasContainer();
198
+ }
194
199
  }, {
195
200
  key: "project",
196
201
  value: function project(lngLat) {
@@ -38,7 +38,6 @@ var Frustum = exports.default = /*#__PURE__*/function () {
38
38
  // bottom
39
39
  [0, 4, 5] // top
40
40
  ];
41
-
42
41
  var frustumPlanes = frustumPlanePointIndices.map(function (p) {
43
42
  var a = _glMatrix.vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[0]]), new Float32Array(frustumCoords[p[1]]));
44
43
  var b = _glMatrix.vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[2]]), new Float32Array(frustumCoords[p[1]]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-map",
3
- "version": "2.20.20",
3
+ "version": "2.21.1",
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.20.20",
43
+ "@antv/l7-utils": "2.21.1",
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": "1966dbadf9efee8d69d22beb4d89947c158da634"
51
+ "gitHead": "1e0d2e5920f479f77095a2c5eddda8a8d7ac9e0f"
52
52
  }