@antv/l7-component 2.25.6 → 2.25.7

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 (151) hide show
  1. package/package.json +5 -5
  2. package/es/assets/iconfont/iconfont.d.ts +0 -21
  3. package/es/assets/iconfont/iconfont.js +0 -61
  4. package/es/constants/index.d.ts +0 -60
  5. package/es/constants/index.js +0 -60
  6. package/es/control/baseControl/buttonControl.d.ts +0 -60
  7. package/es/control/baseControl/buttonControl.js +0 -142
  8. package/es/control/baseControl/control.d.ts +0 -112
  9. package/es/control/baseControl/control.js +0 -256
  10. package/es/control/baseControl/index.d.ts +0 -4
  11. package/es/control/baseControl/index.js +0 -4
  12. package/es/control/baseControl/popperControl.d.ts +0 -28
  13. package/es/control/baseControl/popperControl.js +0 -92
  14. package/es/control/baseControl/selectControl.d.ts +0 -53
  15. package/es/control/baseControl/selectControl.js +0 -173
  16. package/es/control/exportImage.d.ts +0 -19
  17. package/es/control/exportImage.js +0 -73
  18. package/es/control/fullscreen.d.ts +0 -20
  19. package/es/control/fullscreen.js +0 -88
  20. package/es/control/geoLocate.d.ts +0 -17
  21. package/es/control/geoLocate.js +0 -60
  22. package/es/control/layerSwitch.d.ts +0 -27
  23. package/es/control/layerSwitch.js +0 -155
  24. package/es/control/logo.d.ts +0 -14
  25. package/es/control/logo.js +0 -49
  26. package/es/control/mapTheme.d.ts +0 -11
  27. package/es/control/mapTheme.js +0 -69
  28. package/es/control/mouseLocation.d.ts +0 -16
  29. package/es/control/mouseLocation.js +0 -52
  30. package/es/control/scale.d.ts +0 -35
  31. package/es/control/scale.js +0 -121
  32. package/es/control/swipe.d.ts +0 -66
  33. package/es/control/swipe.js +0 -392
  34. package/es/control/zoom.d.ts +0 -39
  35. package/es/control/zoom.js +0 -100
  36. package/es/css/button.less +0 -77
  37. package/es/css/control.less +0 -82
  38. package/es/css/index.css +0 -653
  39. package/es/css/index.less +0 -13
  40. package/es/css/l7.less +0 -69
  41. package/es/css/layerPopup.less +0 -9
  42. package/es/css/logo.less +0 -21
  43. package/es/css/mouseLocation.less +0 -9
  44. package/es/css/popper.less +0 -74
  45. package/es/css/popup.less +0 -176
  46. package/es/css/scale.less +0 -37
  47. package/es/css/select.less +0 -96
  48. package/es/css/swipe.less +0 -80
  49. package/es/css/variables.less +0 -29
  50. package/es/css/zoom.less +0 -34
  51. package/es/images/layers.png +0 -0
  52. package/es/images/layers.svg +0 -1
  53. package/es/images/logo.png +0 -0
  54. package/es/images/quanping.svg +0 -12
  55. package/es/index.d.ts +0 -19
  56. package/es/index.js +0 -708
  57. package/es/interface.d.ts +0 -29
  58. package/es/interface.js +0 -1
  59. package/es/marker-layer.d.ts +0 -46
  60. package/es/marker-layer.js +0 -509
  61. package/es/marker.d.ts +0 -66
  62. package/es/marker.js +0 -495
  63. package/es/popup/layerPopup.d.ts +0 -105
  64. package/es/popup/layerPopup.js +0 -341
  65. package/es/popup/popup.d.ts +0 -147
  66. package/es/popup/popup.js +0 -587
  67. package/es/utils/anchor.d.ts +0 -22
  68. package/es/utils/anchor.js +0 -31
  69. package/es/utils/eventManager.d.ts +0 -42
  70. package/es/utils/eventManager.js +0 -84
  71. package/es/utils/icon.d.ts +0 -1
  72. package/es/utils/icon.js +0 -12
  73. package/es/utils/popper.d.ts +0 -76
  74. package/es/utils/popper.js +0 -257
  75. package/es/utils/screenfull.d.ts +0 -2
  76. package/es/utils/screenfull.js +0 -106
  77. package/lib/assets/iconfont/iconfont.d.ts +0 -21
  78. package/lib/assets/iconfont/iconfont.js +0 -68
  79. package/lib/constants/index.d.ts +0 -60
  80. package/lib/constants/index.js +0 -66
  81. package/lib/control/baseControl/buttonControl.d.ts +0 -60
  82. package/lib/control/baseControl/buttonControl.js +0 -149
  83. package/lib/control/baseControl/control.d.ts +0 -112
  84. package/lib/control/baseControl/control.js +0 -269
  85. package/lib/control/baseControl/index.d.ts +0 -4
  86. package/lib/control/baseControl/index.js +0 -39
  87. package/lib/control/baseControl/popperControl.d.ts +0 -28
  88. package/lib/control/baseControl/popperControl.js +0 -99
  89. package/lib/control/baseControl/selectControl.d.ts +0 -53
  90. package/lib/control/baseControl/selectControl.js +0 -180
  91. package/lib/control/exportImage.d.ts +0 -19
  92. package/lib/control/exportImage.js +0 -80
  93. package/lib/control/fullscreen.d.ts +0 -20
  94. package/lib/control/fullscreen.js +0 -95
  95. package/lib/control/geoLocate.d.ts +0 -17
  96. package/lib/control/geoLocate.js +0 -67
  97. package/lib/control/layerSwitch.d.ts +0 -27
  98. package/lib/control/layerSwitch.js +0 -162
  99. package/lib/control/logo.d.ts +0 -14
  100. package/lib/control/logo.js +0 -55
  101. package/lib/control/mapTheme.d.ts +0 -11
  102. package/lib/control/mapTheme.js +0 -76
  103. package/lib/control/mouseLocation.d.ts +0 -16
  104. package/lib/control/mouseLocation.js +0 -59
  105. package/lib/control/scale.d.ts +0 -35
  106. package/lib/control/scale.js +0 -128
  107. package/lib/control/swipe.d.ts +0 -66
  108. package/lib/control/swipe.js +0 -399
  109. package/lib/control/zoom.d.ts +0 -39
  110. package/lib/control/zoom.js +0 -107
  111. package/lib/css/button.less +0 -77
  112. package/lib/css/control.less +0 -82
  113. package/lib/css/index.css +0 -653
  114. package/lib/css/index.less +0 -13
  115. package/lib/css/l7.less +0 -69
  116. package/lib/css/layerPopup.less +0 -9
  117. package/lib/css/logo.less +0 -21
  118. package/lib/css/mouseLocation.less +0 -9
  119. package/lib/css/popper.less +0 -74
  120. package/lib/css/popup.less +0 -176
  121. package/lib/css/scale.less +0 -37
  122. package/lib/css/select.less +0 -96
  123. package/lib/css/swipe.less +0 -80
  124. package/lib/css/variables.less +0 -29
  125. package/lib/css/zoom.less +0 -34
  126. package/lib/images/layers.png +0 -0
  127. package/lib/images/layers.svg +0 -1
  128. package/lib/images/logo.png +0 -0
  129. package/lib/images/quanping.svg +0 -12
  130. package/lib/index.d.ts +0 -19
  131. package/lib/index.js +0 -835
  132. package/lib/interface.d.ts +0 -29
  133. package/lib/interface.js +0 -5
  134. package/lib/marker-layer.d.ts +0 -46
  135. package/lib/marker-layer.js +0 -518
  136. package/lib/marker.d.ts +0 -66
  137. package/lib/marker.js +0 -502
  138. package/lib/popup/layerPopup.d.ts +0 -105
  139. package/lib/popup/layerPopup.js +0 -348
  140. package/lib/popup/popup.d.ts +0 -147
  141. package/lib/popup/popup.js +0 -594
  142. package/lib/utils/anchor.d.ts +0 -22
  143. package/lib/utils/anchor.js +0 -38
  144. package/lib/utils/eventManager.d.ts +0 -42
  145. package/lib/utils/eventManager.js +0 -92
  146. package/lib/utils/icon.d.ts +0 -1
  147. package/lib/utils/icon.js +0 -19
  148. package/lib/utils/popper.d.ts +0 -76
  149. package/lib/utils/popper.js +0 -264
  150. package/lib/utils/screenfull.d.ts +0 -2
  151. package/lib/utils/screenfull.js +0 -112
@@ -1,100 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import { PositionType } from '@antv/l7-core';
4
- import { DOM } from '@antv/l7-utils';
5
- import { createL7Icon } from "../utils/icon";
6
- import { Control } from "./baseControl";
7
- export { Zoom };
8
- export default class Zoom extends Control {
9
- constructor(...args) {
10
- super(...args);
11
- _defineProperty(this, "disabled", void 0);
12
- _defineProperty(this, "zoomInButton", void 0);
13
- _defineProperty(this, "zoomOutButton", void 0);
14
- _defineProperty(this, "zoomNumDiv", void 0);
15
- _defineProperty(this, "zoomIn", () => {
16
- if (!this.disabled && this.mapsService.getZoom() < this.mapsService.getMaxZoom()) {
17
- this.mapsService.zoomIn();
18
- }
19
- });
20
- _defineProperty(this, "zoomOut", () => {
21
- if (!this.disabled && this.mapsService.getZoom() > this.mapsService.getMinZoom()) {
22
- this.mapsService.zoomOut();
23
- }
24
- });
25
- _defineProperty(this, "updateDisabled", () => {
26
- const mapsService = this.mapsService;
27
- this.zoomInButton.removeAttribute('disabled');
28
- this.zoomOutButton.removeAttribute('disabled');
29
- if (this.disabled || mapsService.getZoom() <= mapsService.getMinZoom()) {
30
- this.zoomOutButton.setAttribute('disabled', 'true');
31
- }
32
- if (this.controlOption.showZoom && this.zoomNumDiv) {
33
- this.zoomNumDiv.innerText = String(Math.floor(mapsService.getZoom()));
34
- }
35
- if (this.disabled || mapsService.getZoom() >= mapsService.getMaxZoom()) {
36
- this.zoomInButton.setAttribute('disabled', 'true');
37
- }
38
- });
39
- }
40
- getDefault(option) {
41
- return _objectSpread(_objectSpread({}, super.getDefault(option)), {}, {
42
- position: PositionType.BOTTOMRIGHT,
43
- name: 'zoom',
44
- zoomInText: createL7Icon('l7-icon-enlarge'),
45
- zoomInTitle: 'Zoom in',
46
- zoomOutText: createL7Icon('l7-icon-narrow'),
47
- zoomOutTitle: 'Zoom out',
48
- showZoom: false
49
- });
50
- }
51
- setOptions(newOptions) {
52
- super.setOptions(newOptions);
53
- if (this.checkUpdateOption(newOptions, ['zoomInText', 'zoomInTitle', 'zoomOutText', 'zoomOutTitle', 'showZoom'])) {
54
- this.resetButtonGroup(this.container);
55
- }
56
- }
57
- onAdd() {
58
- const container = DOM.create('div', 'l7-control-zoom');
59
- this.resetButtonGroup(container);
60
- this.mapsService.on('zoomend', this.updateDisabled);
61
- this.mapsService.on('zoomchange', this.updateDisabled);
62
- return container;
63
- }
64
- onRemove() {
65
- this.mapsService.off('zoomend', this.updateDisabled);
66
- this.mapsService.off('zoomchange', this.updateDisabled);
67
- }
68
- disable() {
69
- this.disabled = true;
70
- this.updateDisabled();
71
- return this;
72
- }
73
- enable() {
74
- this.disabled = false;
75
- this.updateDisabled();
76
- return this;
77
- }
78
- resetButtonGroup(container) {
79
- DOM.clearChildren(container);
80
- this.zoomInButton = this.createButton(this.controlOption.zoomInText, this.controlOption.zoomInTitle, 'l7-button-control', container, this.zoomIn);
81
- if (this.controlOption.showZoom) {
82
- this.zoomNumDiv = this.createButton('0', '', 'l7-button-control l7-control-zoom__number', container);
83
- }
84
- this.zoomOutButton = this.createButton(this.controlOption.zoomOutText, this.controlOption.zoomOutTitle, 'l7-button-control', container, this.zoomOut);
85
- this.updateDisabled();
86
- }
87
- createButton(html, tile, className, container, fn) {
88
- const link = DOM.create('button', className, container);
89
- if (typeof html === 'string') {
90
- link.innerHTML = html;
91
- } else {
92
- link.append(html);
93
- }
94
- link.title = tile;
95
- if (fn) {
96
- link.addEventListener('click', fn);
97
- }
98
- return link;
99
- }
100
- }
@@ -1,77 +0,0 @@
1
- @import url('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
-
38
- .l7-iconfont {
39
- margin-top: 3px;
40
- }
41
-
42
- .l7-button-control__text {
43
- margin-top: 3px;
44
- font-size: 10px;
45
- transform: scale(0.83333);
46
- }
47
- }
48
-
49
- &:not(:disabled) {
50
- &:hover {
51
- background-color: @l7-btn-control-bg-hover-color;
52
- }
53
-
54
- &:active {
55
- background-color: @l7-btn-control-bg-active-color;
56
- }
57
- }
58
-
59
- &:disabled {
60
- background-color: @l7-btn-control-disabled-bg-color;
61
- color: @l7-btn-control-disabled-font-color;
62
- cursor: not-allowed;
63
-
64
- .l7-iconfont {
65
- fill: @l7-btn-control-disabled-font-color;
66
- color: @l7-btn-control-disabled-font-color;
67
- }
68
-
69
- &:hover {
70
- background-color: @l7-btn-control-disabled-bg-color;
71
- }
72
-
73
- &:active {
74
- background-color: @l7-btn-control-disabled-bg-color;
75
- }
76
- }
77
- }
@@ -1,82 +0,0 @@
1
- @import url('variables.less');
2
-
3
- .l7-control-container {
4
- font:
5
- 12px/1.5 'Helvetica Neue',
6
- Arial,
7
- Helvetica,
8
- sans-serif;
9
-
10
- .l7-control {
11
- position: relative;
12
- z-index: @l7-control-z-index;
13
- float: left;
14
- clear: both;
15
- color: @l7-control-font-color;
16
- font-size: @l7-control-font-size;
17
- pointer-events: visiblepainted; /* IE 9-10 doesn't have auto */
18
- pointer-events: auto;
19
-
20
- &.l7-control--hide {
21
- display: none;
22
- }
23
- }
24
-
25
- each(@position-list,{
26
- .l7-@{value} {
27
- @{value}: 0;
28
- display: flex;
29
- position: absolute;
30
- z-index: @l7-control-z-index;
31
- pointer-events: none;
32
- .l7-control:not(.l7-control--hide) {
33
- margin-@{value}: @l7-control-space;
34
- }
35
- }
36
- });
37
-
38
- .l7-center {
39
- position: absolute;
40
- display: flex;
41
- justify-content: center;
42
-
43
- &.l7-top,
44
- &.l7-bottom {
45
- width: 100%;
46
- }
47
-
48
- &.l7-left,
49
- &.l7-right {
50
- height: 100%;
51
- }
52
-
53
- .l7-control {
54
- margin-right: @l7-control-space;
55
- margin-bottom: @l7-control-space;
56
- }
57
- }
58
-
59
- .l7-row {
60
- flex-direction: row;
61
-
62
- &.l7-top {
63
- align-items: flex-start;
64
- }
65
-
66
- &.l7-bottom {
67
- align-items: flex-end;
68
- }
69
- }
70
-
71
- .l7-column {
72
- flex-direction: column;
73
-
74
- &.l7-left {
75
- align-items: flex-start;
76
- }
77
-
78
- &.l7-right {
79
- align-items: flex-end;
80
- }
81
- }
82
- }