@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.
- package/package.json +5 -5
- package/es/assets/iconfont/iconfont.d.ts +0 -21
- package/es/assets/iconfont/iconfont.js +0 -61
- package/es/constants/index.d.ts +0 -60
- package/es/constants/index.js +0 -60
- package/es/control/baseControl/buttonControl.d.ts +0 -60
- package/es/control/baseControl/buttonControl.js +0 -142
- package/es/control/baseControl/control.d.ts +0 -112
- package/es/control/baseControl/control.js +0 -256
- package/es/control/baseControl/index.d.ts +0 -4
- package/es/control/baseControl/index.js +0 -4
- package/es/control/baseControl/popperControl.d.ts +0 -28
- package/es/control/baseControl/popperControl.js +0 -92
- package/es/control/baseControl/selectControl.d.ts +0 -53
- package/es/control/baseControl/selectControl.js +0 -173
- package/es/control/exportImage.d.ts +0 -19
- package/es/control/exportImage.js +0 -73
- package/es/control/fullscreen.d.ts +0 -20
- package/es/control/fullscreen.js +0 -88
- package/es/control/geoLocate.d.ts +0 -17
- package/es/control/geoLocate.js +0 -60
- package/es/control/layerSwitch.d.ts +0 -27
- package/es/control/layerSwitch.js +0 -155
- package/es/control/logo.d.ts +0 -14
- package/es/control/logo.js +0 -49
- package/es/control/mapTheme.d.ts +0 -11
- package/es/control/mapTheme.js +0 -69
- package/es/control/mouseLocation.d.ts +0 -16
- package/es/control/mouseLocation.js +0 -52
- package/es/control/scale.d.ts +0 -35
- package/es/control/scale.js +0 -121
- package/es/control/swipe.d.ts +0 -66
- package/es/control/swipe.js +0 -392
- package/es/control/zoom.d.ts +0 -39
- package/es/control/zoom.js +0 -100
- package/es/css/button.less +0 -77
- package/es/css/control.less +0 -82
- package/es/css/index.css +0 -653
- package/es/css/index.less +0 -13
- package/es/css/l7.less +0 -69
- package/es/css/layerPopup.less +0 -9
- package/es/css/logo.less +0 -21
- package/es/css/mouseLocation.less +0 -9
- package/es/css/popper.less +0 -74
- package/es/css/popup.less +0 -176
- package/es/css/scale.less +0 -37
- package/es/css/select.less +0 -96
- package/es/css/swipe.less +0 -80
- package/es/css/variables.less +0 -29
- package/es/css/zoom.less +0 -34
- package/es/images/layers.png +0 -0
- package/es/images/layers.svg +0 -1
- package/es/images/logo.png +0 -0
- package/es/images/quanping.svg +0 -12
- package/es/index.d.ts +0 -19
- package/es/index.js +0 -708
- package/es/interface.d.ts +0 -29
- package/es/interface.js +0 -1
- package/es/marker-layer.d.ts +0 -46
- package/es/marker-layer.js +0 -509
- package/es/marker.d.ts +0 -66
- package/es/marker.js +0 -495
- package/es/popup/layerPopup.d.ts +0 -105
- package/es/popup/layerPopup.js +0 -341
- package/es/popup/popup.d.ts +0 -147
- package/es/popup/popup.js +0 -587
- package/es/utils/anchor.d.ts +0 -22
- package/es/utils/anchor.js +0 -31
- package/es/utils/eventManager.d.ts +0 -42
- package/es/utils/eventManager.js +0 -84
- package/es/utils/icon.d.ts +0 -1
- package/es/utils/icon.js +0 -12
- package/es/utils/popper.d.ts +0 -76
- package/es/utils/popper.js +0 -257
- package/es/utils/screenfull.d.ts +0 -2
- package/es/utils/screenfull.js +0 -106
- package/lib/assets/iconfont/iconfont.d.ts +0 -21
- package/lib/assets/iconfont/iconfont.js +0 -68
- package/lib/constants/index.d.ts +0 -60
- package/lib/constants/index.js +0 -66
- package/lib/control/baseControl/buttonControl.d.ts +0 -60
- package/lib/control/baseControl/buttonControl.js +0 -149
- package/lib/control/baseControl/control.d.ts +0 -112
- package/lib/control/baseControl/control.js +0 -269
- package/lib/control/baseControl/index.d.ts +0 -4
- package/lib/control/baseControl/index.js +0 -39
- package/lib/control/baseControl/popperControl.d.ts +0 -28
- package/lib/control/baseControl/popperControl.js +0 -99
- package/lib/control/baseControl/selectControl.d.ts +0 -53
- package/lib/control/baseControl/selectControl.js +0 -180
- package/lib/control/exportImage.d.ts +0 -19
- package/lib/control/exportImage.js +0 -80
- package/lib/control/fullscreen.d.ts +0 -20
- package/lib/control/fullscreen.js +0 -95
- package/lib/control/geoLocate.d.ts +0 -17
- package/lib/control/geoLocate.js +0 -67
- package/lib/control/layerSwitch.d.ts +0 -27
- package/lib/control/layerSwitch.js +0 -162
- package/lib/control/logo.d.ts +0 -14
- package/lib/control/logo.js +0 -55
- package/lib/control/mapTheme.d.ts +0 -11
- package/lib/control/mapTheme.js +0 -76
- package/lib/control/mouseLocation.d.ts +0 -16
- package/lib/control/mouseLocation.js +0 -59
- package/lib/control/scale.d.ts +0 -35
- package/lib/control/scale.js +0 -128
- package/lib/control/swipe.d.ts +0 -66
- package/lib/control/swipe.js +0 -399
- package/lib/control/zoom.d.ts +0 -39
- package/lib/control/zoom.js +0 -107
- package/lib/css/button.less +0 -77
- package/lib/css/control.less +0 -82
- package/lib/css/index.css +0 -653
- package/lib/css/index.less +0 -13
- package/lib/css/l7.less +0 -69
- package/lib/css/layerPopup.less +0 -9
- package/lib/css/logo.less +0 -21
- package/lib/css/mouseLocation.less +0 -9
- package/lib/css/popper.less +0 -74
- package/lib/css/popup.less +0 -176
- package/lib/css/scale.less +0 -37
- package/lib/css/select.less +0 -96
- package/lib/css/swipe.less +0 -80
- package/lib/css/variables.less +0 -29
- package/lib/css/zoom.less +0 -34
- package/lib/images/layers.png +0 -0
- package/lib/images/layers.svg +0 -1
- package/lib/images/logo.png +0 -0
- package/lib/images/quanping.svg +0 -12
- package/lib/index.d.ts +0 -19
- package/lib/index.js +0 -835
- package/lib/interface.d.ts +0 -29
- package/lib/interface.js +0 -5
- package/lib/marker-layer.d.ts +0 -46
- package/lib/marker-layer.js +0 -518
- package/lib/marker.d.ts +0 -66
- package/lib/marker.js +0 -502
- package/lib/popup/layerPopup.d.ts +0 -105
- package/lib/popup/layerPopup.js +0 -348
- package/lib/popup/popup.d.ts +0 -147
- package/lib/popup/popup.js +0 -594
- package/lib/utils/anchor.d.ts +0 -22
- package/lib/utils/anchor.js +0 -38
- package/lib/utils/eventManager.d.ts +0 -42
- package/lib/utils/eventManager.js +0 -92
- package/lib/utils/icon.d.ts +0 -1
- package/lib/utils/icon.js +0 -19
- package/lib/utils/popper.d.ts +0 -76
- package/lib/utils/popper.js +0 -264
- package/lib/utils/screenfull.d.ts +0 -2
- package/lib/utils/screenfull.js +0 -112
package/es/control/zoom.js
DELETED
|
@@ -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
|
-
}
|
package/es/css/button.less
DELETED
|
@@ -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
|
-
}
|
package/es/css/control.less
DELETED
|
@@ -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
|
-
}
|