@antv/l7-component 2.9.36-alpha.1 → 2.9.37
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/es/control/BaseControl.d.ts +27 -0
- package/es/control/BaseControl.js +134 -0
- package/es/control/layer.d.ts +38 -0
- package/es/control/layer.js +340 -0
- package/es/control/logo.d.ts +6 -10
- package/es/control/logo.js +11 -41
- package/es/control/scale.d.ts +10 -20
- package/es/control/scale.js +53 -77
- package/es/control/zoom.d.ts +10 -21
- package/es/control/zoom.js +49 -76
- package/es/css/l7.css +502 -0
- package/es/images/logo.png +0 -0
- package/es/index.d.ts +8 -15
- package/es/index.js +9 -15
- package/es/interface.d.ts +20 -1
- package/es/popup.d.ts +35 -0
- package/es/popup.js +300 -0
- package/lib/control/BaseControl.js +160 -0
- package/lib/control/layer.js +362 -0
- package/lib/control/logo.js +23 -50
- package/lib/control/scale.js +62 -82
- package/lib/control/zoom.js +59 -78
- package/lib/css/l7.css +502 -0
- package/lib/images/logo.png +0 -0
- package/lib/index.js +50 -165
- package/lib/popup.js +317 -0
- package/package.json +5 -8
- package/es/assets/iconfont/iconfont.js +0 -53
- package/es/constants/index.d.ts +0 -60
- package/es/constants/index.js +0 -60
- package/es/control/baseControl/buttonControl.d.ts +0 -59
- package/es/control/baseControl/buttonControl.js +0 -191
- package/es/control/baseControl/control.d.ts +0 -106
- package/es/control/baseControl/control.js +0 -301
- 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 -26
- package/es/control/baseControl/popperControl.js +0 -131
- package/es/control/baseControl/selectControl.d.ts +0 -46
- package/es/control/baseControl/selectControl.js +0 -232
- package/es/control/exportImage.d.ts +0 -18
- package/es/control/exportImage.js +0 -163
- package/es/control/fullscreen.d.ts +0 -19
- package/es/control/fullscreen.js +0 -151
- package/es/control/geoLocate.d.ts +0 -16
- package/es/control/geoLocate.js +0 -139
- package/es/control/layerControl.d.ts +0 -21
- package/es/control/layerControl.js +0 -172
- package/es/control/mapTheme.d.ts +0 -10
- package/es/control/mapTheme.js +0 -135
- package/es/control/mouseLocation.d.ts +0 -15
- package/es/control/mouseLocation.js +0 -104
- package/es/css/button.less +0 -70
- package/es/css/control.less +0 -71
- package/es/css/index.css +0 -567
- package/es/css/index.less +0 -12
- package/es/css/l7.less +0 -60
- package/es/css/layerPopup.less +0 -8
- package/es/css/logo.less +0 -18
- package/es/css/mouseLocation.less +0 -9
- package/es/css/popper.less +0 -64
- package/es/css/popup.less +0 -169
- package/es/css/scale.less +0 -34
- package/es/css/select.less +0 -86
- package/es/css/variables.less +0 -28
- package/es/css/zoom.less +0 -21
- package/es/images/quanping.svg +0 -12
- package/es/popup/layerPopup.d.ts +0 -78
- package/es/popup/layerPopup.js +0 -308
- package/es/popup/popup.d.ts +0 -147
- package/es/popup/popup.js +0 -636
- package/es/utils/icon.d.ts +0 -1
- package/es/utils/icon.js +0 -9
- package/es/utils/popper.d.ts +0 -75
- package/es/utils/popper.js +0 -286
- package/es/utils/screenfull.d.ts +0 -2
- package/es/utils/screenfull.js +0 -157
- package/lib/assets/iconfont/iconfont.js +0 -55
- package/lib/constants/index.js +0 -68
- package/lib/control/baseControl/buttonControl.js +0 -207
- package/lib/control/baseControl/control.js +0 -333
- package/lib/control/baseControl/index.js +0 -57
- package/lib/control/baseControl/popperControl.js +0 -142
- package/lib/control/baseControl/selectControl.js +0 -253
- package/lib/control/exportImage.js +0 -177
- package/lib/control/fullscreen.js +0 -164
- package/lib/control/geoLocate.js +0 -154
- package/lib/control/layerControl.js +0 -182
- package/lib/control/mapTheme.js +0 -151
- package/lib/control/mouseLocation.js +0 -120
- package/lib/css/button.less +0 -70
- package/lib/css/control.less +0 -71
- package/lib/css/index.css +0 -567
- package/lib/css/index.less +0 -12
- package/lib/css/l7.less +0 -60
- package/lib/css/layerPopup.less +0 -8
- package/lib/css/logo.less +0 -18
- package/lib/css/mouseLocation.less +0 -9
- package/lib/css/popper.less +0 -64
- package/lib/css/popup.less +0 -169
- package/lib/css/scale.less +0 -34
- package/lib/css/select.less +0 -86
- package/lib/css/variables.less +0 -28
- package/lib/css/zoom.less +0 -21
- package/lib/images/quanping.svg +0 -12
- package/lib/popup/layerPopup.js +0 -317
- package/lib/popup/popup.js +0 -651
- package/lib/utils/icon.js +0 -18
- package/lib/utils/popper.js +0 -297
- package/lib/utils/screenfull.js +0 -167
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = exports.MouseLocation = void 0;
|
|
9
|
-
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
|
|
12
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
|
-
|
|
24
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
25
|
-
|
|
26
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
27
|
-
|
|
28
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
|
-
|
|
30
|
-
var _l7Core = require("@antv/l7-core");
|
|
31
|
-
|
|
32
|
-
var _l7Utils = require("@antv/l7-utils");
|
|
33
|
-
|
|
34
|
-
var _control = _interopRequireDefault(require("./baseControl/control"));
|
|
35
|
-
|
|
36
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
|
-
|
|
38
|
-
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; } }
|
|
39
|
-
|
|
40
|
-
var MouseLocation = /*#__PURE__*/function (_Control) {
|
|
41
|
-
(0, _inherits2.default)(MouseLocation, _Control);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(MouseLocation);
|
|
44
|
-
|
|
45
|
-
function MouseLocation() {
|
|
46
|
-
var _this;
|
|
47
|
-
|
|
48
|
-
(0, _classCallCheck2.default)(this, MouseLocation);
|
|
49
|
-
|
|
50
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
-
args[_key] = arguments[_key];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
55
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "location", [0, 0]);
|
|
56
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onMouseMove", function (e) {
|
|
57
|
-
var position = _this.location;
|
|
58
|
-
var lngLat = e.lngLat || e.lnglat;
|
|
59
|
-
var transform = _this.controlOption.transform;
|
|
60
|
-
|
|
61
|
-
if (lngLat) {
|
|
62
|
-
position = [lngLat.lng, lngLat.lat];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
_this.location = position;
|
|
66
|
-
|
|
67
|
-
if (transform) {
|
|
68
|
-
position = transform(position);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
_this.insertLocation2HTML(position);
|
|
72
|
-
|
|
73
|
-
_this.emit('locationChange', position);
|
|
74
|
-
});
|
|
75
|
-
return _this;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
(0, _createClass2.default)(MouseLocation, [{
|
|
79
|
-
key: "getLocation",
|
|
80
|
-
value: function getLocation() {
|
|
81
|
-
return this.location;
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "getDefault",
|
|
85
|
-
value: function getDefault(option) {
|
|
86
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _get2.default)((0, _getPrototypeOf2.default)(MouseLocation.prototype), "getDefault", this).call(this, option)), {}, {
|
|
87
|
-
position: _l7Core.PositionType.BOTTOMLEFT,
|
|
88
|
-
transform: function transform(_ref) {
|
|
89
|
-
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
90
|
-
lng = _ref2[0],
|
|
91
|
-
lat = _ref2[1];
|
|
92
|
-
|
|
93
|
-
return [+(+lng).toFixed(6), +(+lat).toFixed(6)];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "onAdd",
|
|
99
|
-
value: function onAdd() {
|
|
100
|
-
var container = _l7Utils.DOM.create('div', 'l7-control-mouse-location');
|
|
101
|
-
|
|
102
|
-
container.innerHTML = ' ';
|
|
103
|
-
this.mapsService.on('mousemove', this.onMouseMove);
|
|
104
|
-
return container;
|
|
105
|
-
}
|
|
106
|
-
}, {
|
|
107
|
-
key: "onRemove",
|
|
108
|
-
value: function onRemove() {
|
|
109
|
-
this.mapsService.off('mousemove', this.onMouseMove);
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "insertLocation2HTML",
|
|
113
|
-
value: function insertLocation2HTML(position) {
|
|
114
|
-
this.container.innerText = position.join(', ');
|
|
115
|
-
}
|
|
116
|
-
}]);
|
|
117
|
-
return MouseLocation;
|
|
118
|
-
}(_control.default);
|
|
119
|
-
|
|
120
|
-
exports.default = exports.MouseLocation = MouseLocation;
|
package/lib/css/button.less
DELETED
|
@@ -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
|
-
}
|
package/lib/css/control.less
DELETED
|
@@ -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: 800;
|
|
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: 1000;
|
|
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
|
-
}
|