@antv/l7-component 2.18.0 → 2.18.2

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.
Files changed (114) hide show
  1. package/package.json +6 -6
  2. package/es/assets/iconfont/iconfont.js +0 -46
  3. package/es/constants/index.d.ts +0 -60
  4. package/es/constants/index.js +0 -60
  5. package/es/control/baseControl/buttonControl.d.ts +0 -59
  6. package/es/control/baseControl/buttonControl.js +0 -177
  7. package/es/control/baseControl/control.d.ts +0 -112
  8. package/es/control/baseControl/control.js +0 -302
  9. package/es/control/baseControl/index.d.ts +0 -4
  10. package/es/control/baseControl/index.js +0 -4
  11. package/es/control/baseControl/popperControl.d.ts +0 -26
  12. package/es/control/baseControl/popperControl.js +0 -120
  13. package/es/control/baseControl/selectControl.d.ts +0 -46
  14. package/es/control/baseControl/selectControl.js +0 -204
  15. package/es/control/exportImage.d.ts +0 -18
  16. package/es/control/exportImage.js +0 -159
  17. package/es/control/fullscreen.d.ts +0 -19
  18. package/es/control/fullscreen.js +0 -119
  19. package/es/control/geoLocate.d.ts +0 -16
  20. package/es/control/geoLocate.js +0 -107
  21. package/es/control/layerSwitch.d.ts +0 -19
  22. package/es/control/layerSwitch.js +0 -141
  23. package/es/control/logo.d.ts +0 -13
  24. package/es/control/logo.js +0 -75
  25. package/es/control/mapTheme.d.ts +0 -10
  26. package/es/control/mapTheme.js +0 -110
  27. package/es/control/mouseLocation.d.ts +0 -15
  28. package/es/control/mouseLocation.js +0 -83
  29. package/es/control/scale.d.ts +0 -34
  30. package/es/control/scale.js +0 -149
  31. package/es/control/zoom.d.ts +0 -38
  32. package/es/control/zoom.js +0 -132
  33. package/es/css/button.less +0 -70
  34. package/es/css/control.less +0 -71
  35. package/es/css/index.css +0 -594
  36. package/es/css/index.less +0 -12
  37. package/es/css/l7.less +0 -62
  38. package/es/css/layerPopup.less +0 -8
  39. package/es/css/logo.less +0 -18
  40. package/es/css/mouseLocation.less +0 -9
  41. package/es/css/popper.less +0 -64
  42. package/es/css/popup.less +0 -185
  43. package/es/css/scale.less +0 -34
  44. package/es/css/select.less +0 -86
  45. package/es/css/variables.less +0 -30
  46. package/es/css/zoom.less +0 -29
  47. package/es/images/layers.png +0 -0
  48. package/es/images/layers.svg +0 -1
  49. package/es/images/logo.png +0 -0
  50. package/es/images/quanping.svg +0 -12
  51. package/es/index.d.ts +0 -18
  52. package/es/index.js +0 -49
  53. package/es/interface.d.ts +0 -18
  54. package/es/interface.js +0 -1
  55. package/es/marker-layer.d.ts +0 -54
  56. package/es/marker-layer.js +0 -343
  57. package/es/marker.d.ts +0 -55
  58. package/es/marker.js +0 -410
  59. package/es/popup/layerPopup.d.ts +0 -86
  60. package/es/popup/layerPopup.js +0 -312
  61. package/es/popup/popup.d.ts +0 -139
  62. package/es/popup/popup.js +0 -567
  63. package/es/utils/anchor.d.ts +0 -22
  64. package/es/utils/anchor.js +0 -31
  65. package/es/utils/icon.d.ts +0 -1
  66. package/es/utils/icon.js +0 -9
  67. package/es/utils/popper.d.ts +0 -75
  68. package/es/utils/popper.js +0 -259
  69. package/es/utils/screenfull.d.ts +0 -2
  70. package/es/utils/screenfull.js +0 -128
  71. package/lib/assets/iconfont/iconfont.js +0 -48
  72. package/lib/constants/index.js +0 -68
  73. package/lib/control/baseControl/buttonControl.js +0 -183
  74. package/lib/control/baseControl/control.js +0 -314
  75. package/lib/control/baseControl/index.js +0 -39
  76. package/lib/control/baseControl/popperControl.js +0 -126
  77. package/lib/control/baseControl/selectControl.js +0 -210
  78. package/lib/control/exportImage.js +0 -165
  79. package/lib/control/fullscreen.js +0 -125
  80. package/lib/control/geoLocate.js +0 -113
  81. package/lib/control/layerSwitch.js +0 -147
  82. package/lib/control/logo.js +0 -81
  83. package/lib/control/mapTheme.js +0 -116
  84. package/lib/control/mouseLocation.js +0 -89
  85. package/lib/control/scale.js +0 -155
  86. package/lib/control/zoom.js +0 -138
  87. package/lib/css/button.less +0 -70
  88. package/lib/css/control.less +0 -71
  89. package/lib/css/index.css +0 -594
  90. package/lib/css/index.less +0 -12
  91. package/lib/css/l7.less +0 -62
  92. package/lib/css/layerPopup.less +0 -8
  93. package/lib/css/logo.less +0 -18
  94. package/lib/css/mouseLocation.less +0 -9
  95. package/lib/css/popper.less +0 -64
  96. package/lib/css/popup.less +0 -185
  97. package/lib/css/scale.less +0 -34
  98. package/lib/css/select.less +0 -86
  99. package/lib/css/variables.less +0 -30
  100. package/lib/css/zoom.less +0 -29
  101. package/lib/images/layers.png +0 -0
  102. package/lib/images/layers.svg +0 -1
  103. package/lib/images/logo.png +0 -0
  104. package/lib/images/quanping.svg +0 -12
  105. package/lib/index.js +0 -169
  106. package/lib/interface.js +0 -5
  107. package/lib/marker-layer.js +0 -349
  108. package/lib/marker.js +0 -417
  109. package/lib/popup/layerPopup.js +0 -317
  110. package/lib/popup/popup.js +0 -573
  111. package/lib/utils/anchor.js +0 -40
  112. package/lib/utils/icon.js +0 -16
  113. package/lib/utils/popper.js +0 -263
  114. package/lib/utils/screenfull.js +0 -136
@@ -1,132 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
- import _get from "@babel/runtime/helpers/esm/get";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
- import { PositionType } from '@antv/l7-core';
13
- import { DOM } from '@antv/l7-utils';
14
- import { createL7Icon } from "../utils/icon";
15
- import { Control } from "./baseControl";
16
- export { Zoom };
17
- var Zoom = /*#__PURE__*/function (_Control) {
18
- _inherits(Zoom, _Control);
19
- var _super = _createSuper(Zoom);
20
- function Zoom() {
21
- var _this;
22
- _classCallCheck(this, Zoom);
23
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
- args[_key] = arguments[_key];
25
- }
26
- _this = _super.call.apply(_super, [this].concat(args));
27
- _defineProperty(_assertThisInitialized(_this), "zoomIn", function () {
28
- if (!_this.disabled && _this.mapsService.getZoom() < _this.mapsService.getMaxZoom()) {
29
- _this.mapsService.zoomIn();
30
- }
31
- });
32
- _defineProperty(_assertThisInitialized(_this), "zoomOut", function () {
33
- if (!_this.disabled && _this.mapsService.getZoom() > _this.mapsService.getMinZoom()) {
34
- _this.mapsService.zoomOut();
35
- }
36
- });
37
- _defineProperty(_assertThisInitialized(_this), "updateDisabled", function () {
38
- var mapsService = _this.mapsService;
39
- _this.zoomInButton.removeAttribute('disabled');
40
- _this.zoomOutButton.removeAttribute('disabled');
41
- if (_this.disabled || mapsService.getZoom() <= mapsService.getMinZoom()) {
42
- _this.zoomOutButton.setAttribute('disabled', 'true');
43
- }
44
- if (_this.controlOption.showZoom && _this.zoomNumDiv) {
45
- _this.zoomNumDiv.innerText = String(Math.floor(mapsService.getZoom()));
46
- }
47
- if (_this.disabled || mapsService.getZoom() >= mapsService.getMaxZoom()) {
48
- _this.zoomInButton.setAttribute('disabled', 'true');
49
- }
50
- });
51
- return _this;
52
- }
53
- _createClass(Zoom, [{
54
- key: "getDefault",
55
- value: function getDefault(option) {
56
- return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(Zoom.prototype), "getDefault", this).call(this, option)), {}, {
57
- position: PositionType.BOTTOMRIGHT,
58
- name: 'zoom',
59
- zoomInText: createL7Icon('l7-icon-enlarge'),
60
- zoomInTitle: 'Zoom in',
61
- zoomOutText: createL7Icon('l7-icon-narrow'),
62
- zoomOutTitle: 'Zoom out',
63
- showZoom: false
64
- });
65
- }
66
- }, {
67
- key: "setOptions",
68
- value: function setOptions(newOptions) {
69
- _get(_getPrototypeOf(Zoom.prototype), "setOptions", this).call(this, newOptions);
70
- if (this.checkUpdateOption(newOptions, ['zoomInText', 'zoomInTitle', 'zoomOutText', 'zoomOutTitle', 'showZoom'])) {
71
- this.resetButtonGroup(this.container);
72
- }
73
- }
74
- }, {
75
- key: "onAdd",
76
- value: function onAdd() {
77
- var container = DOM.create('div', 'l7-control-zoom');
78
- this.resetButtonGroup(container);
79
- this.mapsService.on('zoomend', this.updateDisabled);
80
- this.mapsService.on('zoomchange', this.updateDisabled);
81
- return container;
82
- }
83
- }, {
84
- key: "onRemove",
85
- value: function onRemove() {
86
- this.mapsService.off('zoomend', this.updateDisabled);
87
- this.mapsService.off('zoomchange', this.updateDisabled);
88
- }
89
- }, {
90
- key: "disable",
91
- value: function disable() {
92
- this.disabled = true;
93
- this.updateDisabled();
94
- return this;
95
- }
96
- }, {
97
- key: "enable",
98
- value: function enable() {
99
- this.disabled = false;
100
- this.updateDisabled();
101
- return this;
102
- }
103
- }, {
104
- key: "resetButtonGroup",
105
- value: function resetButtonGroup(container) {
106
- DOM.clearChildren(container);
107
- this.zoomInButton = this.createButton(this.controlOption.zoomInText, this.controlOption.zoomInTitle, 'l7-button-control', container, this.zoomIn);
108
- if (this.controlOption.showZoom) {
109
- this.zoomNumDiv = this.createButton('0', '', 'l7-button-control l7-control-zoom__number', container);
110
- }
111
- this.zoomOutButton = this.createButton(this.controlOption.zoomOutText, this.controlOption.zoomOutTitle, 'l7-button-control', container, this.zoomOut);
112
- this.updateDisabled();
113
- }
114
- }, {
115
- key: "createButton",
116
- value: function createButton(html, tile, className, container, fn) {
117
- var link = DOM.create('button', className, container);
118
- if (typeof html === 'string') {
119
- link.innerHTML = html;
120
- } else {
121
- link.append(html);
122
- }
123
- link.title = tile;
124
- if (fn) {
125
- link.addEventListener('click', fn);
126
- }
127
- return link;
128
- }
129
- }]);
130
- return Zoom;
131
- }(Control);
132
- export { Zoom as default };
@@ -1,70 +0,0 @@
1
- @import 'variables.less';
2
-
3
- .l7-button-control {
4
- min-width: @l7-btn-control-size;
5
- height: @l7-btn-control-size;
6
- background-color: @l7-control-bg-color;
7
- border-width: 0;
8
- border-radius: @l7-btn-control-border-radius;
9
- outline: 0;
10
- cursor: pointer;
11
- transition: all 0.2s;
12
- display: flex;
13
- justify-content: center;
14
- align-items: center;
15
- padding: 0 ((@l7-btn-control-size - @l7-btn-icon-size) / 2);
16
- box-shadow: @l7-control-shadow;
17
- line-height: 16px;
18
-
19
- .l7-iconfont {
20
- fill: @l7-control-font-color;
21
- color: @l7-control-font-color;
22
- width: @l7-btn-icon-size;
23
- height: @l7-btn-icon-size;
24
- }
25
-
26
- &.l7-button-control--row {
27
- padding: 0 16px 0 13px;
28
-
29
- * + .l7-button-control__text {
30
- margin-left: 8px;
31
- }
32
- }
33
-
34
- &.l7-button-control--column {
35
- height: @l7-btn-column-height;
36
- flex-direction: column;
37
- .l7-iconfont {
38
- margin-top: 3px;
39
- }
40
- .l7-button-control__text {
41
- margin-top: 3px;
42
- font-size: 10px;
43
- transform: scale(0.83333);
44
- }
45
- }
46
-
47
- &:not(:disabled) {
48
- &:hover {
49
- background-color: @l7-btn-control-bg-hover-color;
50
- }
51
- &:active {
52
- background-color: @l7-btn-control-bg-active-color;
53
- }
54
- }
55
- &:disabled {
56
- background-color: @l7-btn-control-disabled-bg-color;
57
- color: @l7-btn-control-disabled-font-color;
58
- cursor: not-allowed;
59
- .l7-iconfont {
60
- fill: @l7-btn-control-disabled-font-color;
61
- color: @l7-btn-control-disabled-font-color;
62
- }
63
- &:hover {
64
- background-color: @l7-btn-control-disabled-bg-color;
65
- }
66
- &:active {
67
- background-color: @l7-btn-control-disabled-bg-color;
68
- }
69
- }
70
- }
@@ -1,71 +0,0 @@
1
- @import 'variables.less';
2
-
3
- .l7-control-container {
4
- font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;
5
-
6
- .l7-control {
7
- position: relative;
8
- z-index: @l7-control-z-index;
9
- float: left;
10
- clear: both;
11
- color: @l7-control-font-color;
12
- font-size: @l7-control-font-size;
13
- pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
14
- pointer-events: auto;
15
-
16
- &.l7-control--hide {
17
- display: none;
18
- }
19
- }
20
-
21
- each(@position-list,{
22
- .l7-@{value} {
23
- @{value}: 0;
24
- display: flex;
25
- position: absolute;
26
- z-index: @l7-control-z-index;
27
- pointer-events: none;
28
- .l7-control:not(.l7-control--hide) {
29
- margin-@{value}: @l7-control-space;
30
- }
31
- }
32
- });
33
-
34
- .l7-center {
35
- position: absolute;
36
- display: flex;
37
- justify-content: center;
38
- &.l7-top,
39
- &.l7-bottom {
40
- width: 100%;
41
- }
42
- &.l7-left,
43
- &.l7-right {
44
- height: 100%;
45
- }
46
- .l7-control {
47
- margin-right: @l7-control-space;
48
- margin-bottom: @l7-control-space;
49
- }
50
- }
51
-
52
- .l7-row {
53
- flex-direction: row;
54
- &.l7-top {
55
- align-items: flex-start;
56
- }
57
- &.l7-bottom {
58
- align-items: flex-end;
59
- }
60
- }
61
-
62
- .l7-column {
63
- flex-direction: column;
64
- &.l7-left {
65
- align-items: flex-start;
66
- }
67
- &.l7-right {
68
- align-items: flex-end;
69
- }
70
- }
71
- }