@antv/l7-component 2.10.15 → 2.11.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.
@@ -1,16 +1,16 @@
1
1
  import { IPopperControlOption, PopperControl } from './popperControl';
2
- declare type BaseOptionItem = {
2
+ type BaseOptionItem = {
3
3
  value: string;
4
4
  text: string;
5
5
  [key: string]: string;
6
6
  };
7
- declare type NormalOptionItem = BaseOptionItem & {
7
+ type NormalOptionItem = BaseOptionItem & {
8
8
  icon?: HTMLElement;
9
9
  };
10
- declare type ImageOptionItem = BaseOptionItem & {
10
+ type ImageOptionItem = BaseOptionItem & {
11
11
  img: string;
12
12
  };
13
- export declare type ControlOptionItem = ImageOptionItem | NormalOptionItem;
13
+ export type ControlOptionItem = ImageOptionItem | NormalOptionItem;
14
14
  export interface ISelectControlOption extends IPopperControlOption {
15
15
  options: ControlOptionItem[];
16
16
  defaultValue?: string | string[];
package/es/interface.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type ControlEvent = 'show' | 'hide' | 'add' | 'remove' | string;
1
+ export type ControlEvent = 'show' | 'hide' | 'add' | 'remove' | string;
2
2
  export interface IMarkerStyleOption {
3
3
  element?: (...args: any[]) => any;
4
4
  style: {
package/es/marker.js CHANGED
@@ -39,7 +39,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
39
39
  });
40
40
 
41
41
  _this.markerOption = _objectSpread(_objectSpread({}, _this.getDefault()), option);
42
- bindAll(['update', 'onMove', 'onUp', 'addDragHandler', 'onMapClick'], _assertThisInitialized(_this));
42
+ bindAll(['update', 'onMove', 'onMapClick'], _assertThisInitialized(_this));
43
43
 
44
44
  _this.init();
45
45
 
@@ -87,11 +87,10 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
87
87
  if (this.mapsService) {
88
88
  this.mapsService.off('click', this.onMapClick);
89
89
  this.mapsService.off('move', this.update);
90
- this.mapsService.off('moveend', this.update);
91
- this.mapsService.off('mousedown', this.addDragHandler);
92
- this.mapsService.off('touchstart', this.addDragHandler);
93
- this.mapsService.off('mouseup', this.onUp);
94
- this.mapsService.off('touchend', this.onUp);
90
+ this.mapsService.off('moveend', this.update); // this.mapsService.off('mousedown', this.addDragHandler);
91
+ // this.mapsService.off('touchstart', this.addDragHandler);
92
+ // this.mapsService.off('mouseup', this.onUp);
93
+ // this.mapsService.off('touchend', this.onUp);
95
94
  }
96
95
 
97
96
  this.unRegisterMarkerEvent();
@@ -418,7 +417,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
418
417
  key: "addDragHandler",
419
418
  value: // eslint-disable-next-line @typescript-eslint/no-unused-vars
420
419
  function addDragHandler(e) {
421
- throw new Error('Method not implemented.');
420
+ return null;
422
421
  } // eslint-disable-next-line @typescript-eslint/no-unused-vars
423
422
 
424
423
  }, {
@@ -1,13 +1,13 @@
1
1
  import { ILayer, IPopupOption } from '@antv/l7-core';
2
2
  import { Container } from 'inversify';
3
3
  import Popup from './popup';
4
- export declare type LayerField = {
4
+ export type LayerField = {
5
5
  field: string;
6
6
  formatField?: ((field: string) => string) | string;
7
7
  formatValue?: ((value: any) => any) | string;
8
8
  getValue?: (feature: any) => any;
9
9
  };
10
- export declare type LayerPopupConfigItem = {
10
+ export type LayerPopupConfigItem = {
11
11
  layer: ILayer | string;
12
12
  fields: Array<LayerField | string>;
13
13
  };
@@ -16,7 +16,7 @@ export interface ILayerPopupOption extends IPopupOption {
16
16
  items?: LayerPopupConfigItem[];
17
17
  trigger: 'hover' | 'click';
18
18
  }
19
- declare type LayerMapInfo = {
19
+ type LayerMapInfo = {
20
20
  onMouseMove?: (layer: ILayer, e: any) => void;
21
21
  onMouseOut?: (layer: ILayer, e: any) => void;
22
22
  onClick?: (layer: ILayer, e: any) => void;
@@ -2,15 +2,15 @@ import { EventEmitter } from 'eventemitter3';
2
2
  /**
3
3
  * 气泡位置枚举
4
4
  */
5
- export declare type PopperPlacement = 'top-start' | 'top' | 'top-end' | 'left-start' | 'left' | 'left-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'right-start' | 'right' | 'right-end';
5
+ export type PopperPlacement = 'top-start' | 'top' | 'top-end' | 'left-start' | 'left' | 'left-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'right-start' | 'right' | 'right-end';
6
6
  /**
7
7
  * 气泡触发类型,当前支持 click 和 hover 两种类型
8
8
  */
9
- export declare type PopperTrigger = 'click' | 'hover';
9
+ export type PopperTrigger = 'click' | 'hover';
10
10
  /**
11
11
  * 气泡内容类型
12
12
  */
13
- export declare type PopperContent = string | HTMLElement | null;
13
+ export type PopperContent = string | HTMLElement | null;
14
14
  export interface IPopperOption {
15
15
  placement: PopperPlacement;
16
16
  trigger: PopperTrigger;
package/lib/marker.js CHANGED
@@ -53,7 +53,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
53
53
  });
54
54
  });
55
55
  _this.markerOption = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _this.getDefault()), option);
56
- (0, _l7Utils.bindAll)(['update', 'onMove', 'onUp', 'addDragHandler', 'onMapClick'], (0, _assertThisInitialized2.default)(_this));
56
+ (0, _l7Utils.bindAll)(['update', 'onMove', 'onMapClick'], (0, _assertThisInitialized2.default)(_this));
57
57
 
58
58
  _this.init();
59
59
 
@@ -101,11 +101,10 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
101
101
  if (this.mapsService) {
102
102
  this.mapsService.off('click', this.onMapClick);
103
103
  this.mapsService.off('move', this.update);
104
- this.mapsService.off('moveend', this.update);
105
- this.mapsService.off('mousedown', this.addDragHandler);
106
- this.mapsService.off('touchstart', this.addDragHandler);
107
- this.mapsService.off('mouseup', this.onUp);
108
- this.mapsService.off('touchend', this.onUp);
104
+ this.mapsService.off('moveend', this.update); // this.mapsService.off('mousedown', this.addDragHandler);
105
+ // this.mapsService.off('touchstart', this.addDragHandler);
106
+ // this.mapsService.off('mouseup', this.onUp);
107
+ // this.mapsService.off('touchend', this.onUp);
109
108
  }
110
109
 
111
110
  this.unRegisterMarkerEvent();
@@ -434,7 +433,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
434
433
  key: "addDragHandler",
435
434
  value: // eslint-disable-next-line @typescript-eslint/no-unused-vars
436
435
  function addDragHandler(e) {
437
- throw new Error('Method not implemented.');
436
+ return null;
438
437
  } // eslint-disable-next-line @typescript-eslint/no-unused-vars
439
438
 
440
439
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-component",
3
- "version": "2.10.15",
3
+ "version": "2.11.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -26,8 +26,8 @@
26
26
  "author": "lzxue",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@antv/l7-core": "2.10.15",
30
- "@antv/l7-utils": "2.10.15",
29
+ "@antv/l7-core": "2.11.0",
30
+ "@antv/l7-utils": "2.11.0",
31
31
  "@babel/runtime": "^7.7.7",
32
32
  "eventemitter3": "^4.0.0",
33
33
  "inversify": "^5.0.1",
@@ -36,11 +36,11 @@
36
36
  "supercluster": "^7.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@antv/l7-test-utils": "2.10.15",
39
+ "@antv/l7-test-utils": "2.11.0",
40
40
  "gcoord": "^0.3.2",
41
41
  "less": "^4.1.3"
42
42
  },
43
- "gitHead": "b567d8c716b042eeb7ab8e05d7e5e0f666469f98",
43
+ "gitHead": "ef67b8e74cb940ab6e150782d70b81678de4609d",
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  }