@antv/l7-component 2.19.11 → 2.20.1
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/buttonControl.js +6 -6
- package/es/control/exportImage.js +9 -12
- package/es/css/index.css +18 -21
- package/es/css/select.less +18 -21
- package/es/css/variables.less +2 -1
- package/es/index.js +1 -1
- package/es/marker-layer.d.ts +2 -0
- package/es/marker-layer.js +26 -4
- package/es/popup/layerPopup.js +7 -7
- package/es/popup/popup.js +4 -4
- package/lib/constants/index.js +3 -5
- package/lib/control/baseControl/buttonControl.js +8 -9
- package/lib/control/baseControl/control.js +1 -2
- package/lib/control/baseControl/popperControl.js +2 -3
- package/lib/control/baseControl/selectControl.js +2 -3
- package/lib/control/exportImage.js +11 -15
- package/lib/control/fullscreen.js +2 -3
- package/lib/control/geoLocate.js +2 -3
- package/lib/control/layerSwitch.js +2 -3
- package/lib/control/logo.js +2 -3
- package/lib/control/mapTheme.js +2 -3
- package/lib/control/mouseLocation.js +2 -3
- package/lib/control/scale.js +2 -3
- package/lib/control/zoom.js +2 -3
- package/lib/css/index.css +18 -21
- package/lib/css/select.less +18 -21
- package/lib/css/variables.less +2 -1
- package/lib/index.js +1 -1
- package/lib/marker-layer.js +27 -6
- package/lib/marker.js +2 -3
- package/lib/popup/layerPopup.js +9 -10
- package/lib/popup/popup.js +6 -7
- package/lib/utils/anchor.js +2 -4
- package/lib/utils/icon.js +2 -3
- package/lib/utils/popper.js +1 -2
- package/lib/utils/screenfull.js +1 -2
- package/package.json +6 -6
package/lib/popup/popup.js
CHANGED
|
@@ -19,7 +19,7 @@ var _eventemitter = require("eventemitter3");
|
|
|
19
19
|
var _icon = require("../utils/icon");
|
|
20
20
|
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); }; }
|
|
21
21
|
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; } }
|
|
22
|
-
var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
22
|
+
var Popup = exports.default = exports.Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
23
23
|
(0, _inherits2.default)(Popup, _EventEmitter);
|
|
24
24
|
var _super = _createSuper(Popup);
|
|
25
25
|
function Popup(cfg) {
|
|
@@ -473,10 +473,10 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
473
473
|
var _this3 = this;
|
|
474
474
|
var mapsService = this.mapsService;
|
|
475
475
|
if (mapsService) {
|
|
476
|
-
mapsService === null || mapsService === void 0
|
|
476
|
+
mapsService === null || mapsService === void 0 || mapsService.off('click', this.onCloseButtonClick);
|
|
477
477
|
if (this.popupOption.closeOnClick && !onlyClear) {
|
|
478
478
|
requestAnimationFrame(function () {
|
|
479
|
-
mapsService === null || mapsService === void 0
|
|
479
|
+
mapsService === null || mapsService === void 0 || mapsService.on('click', _this3.onCloseButtonClick);
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
}
|
|
@@ -495,9 +495,9 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
495
495
|
var _this$mapsService;
|
|
496
496
|
var container = (_this$mapsService = this.mapsService) === null || _this$mapsService === void 0 ? void 0 : _this$mapsService.getContainer();
|
|
497
497
|
if (container) {
|
|
498
|
-
container === null || container === void 0
|
|
498
|
+
container === null || container === void 0 || container.removeEventListener('mousemove', this.onMouseMove);
|
|
499
499
|
if (this.popupOption.followCursor && !onlyClear) {
|
|
500
|
-
container === null || container === void 0
|
|
500
|
+
container === null || container === void 0 || container.addEventListener('mousemove', this.onMouseMove);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
}
|
|
@@ -577,5 +577,4 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
577
577
|
}
|
|
578
578
|
}]);
|
|
579
579
|
return Popup;
|
|
580
|
-
}(_eventemitter.EventEmitter);
|
|
581
|
-
exports.default = exports.Popup = Popup;
|
|
580
|
+
}(_eventemitter.EventEmitter);
|
package/lib/utils/anchor.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.anchorType = exports.anchorTranslate = void 0;
|
|
7
7
|
exports.applyAnchorClass = applyAnchorClass;
|
|
8
|
-
var anchorType = /*#__PURE__*/function (anchorType) {
|
|
8
|
+
var anchorType = exports.anchorType = /*#__PURE__*/function (anchorType) {
|
|
9
9
|
anchorType["CENTER"] = "center";
|
|
10
10
|
anchorType["TOP"] = "top";
|
|
11
11
|
anchorType["TOP-LEFT"] = "top-left";
|
|
@@ -16,8 +16,7 @@ var anchorType = /*#__PURE__*/function (anchorType) {
|
|
|
16
16
|
anchorType["RIGHT"] = "right";
|
|
17
17
|
return anchorType;
|
|
18
18
|
}({});
|
|
19
|
-
exports.
|
|
20
|
-
var anchorTranslate = {
|
|
19
|
+
var anchorTranslate = exports.anchorTranslate = {
|
|
21
20
|
center: 'translate(-50%,-50%)',
|
|
22
21
|
top: 'translate(-50%,0)',
|
|
23
22
|
'top-left': 'translate(0,0)',
|
|
@@ -28,7 +27,6 @@ var anchorTranslate = {
|
|
|
28
27
|
left: 'translate(0,-50%)',
|
|
29
28
|
right: 'translate(-100%,-50%)'
|
|
30
29
|
};
|
|
31
|
-
exports.anchorTranslate = anchorTranslate;
|
|
32
30
|
function applyAnchorClass(element, anchor, prefix) {
|
|
33
31
|
var classList = element.classList;
|
|
34
32
|
for (var key in anchorTranslate) {
|
package/lib/utils/icon.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createL7Icon = void 0;
|
|
7
|
-
var createL7Icon = function createL7Icon(className) {
|
|
7
|
+
var createL7Icon = exports.createL7Icon = function createL7Icon(className) {
|
|
8
8
|
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
9
9
|
svg.classList.add('l7-iconfont');
|
|
10
10
|
svg.setAttribute('aria-hidden', 'true');
|
|
@@ -12,5 +12,4 @@ var createL7Icon = function createL7Icon(className) {
|
|
|
12
12
|
use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', "#".concat(className));
|
|
13
13
|
svg.appendChild(use);
|
|
14
14
|
return svg;
|
|
15
|
-
};
|
|
16
|
-
exports.createL7Icon = createL7Icon;
|
|
15
|
+
};
|
package/lib/utils/popper.js
CHANGED
|
@@ -26,7 +26,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
26
26
|
/**
|
|
27
27
|
* 气泡内容类型
|
|
28
28
|
*/
|
|
29
|
-
var Popper = /*#__PURE__*/function (_EventEmitter) {
|
|
29
|
+
var Popper = exports.Popper = /*#__PURE__*/function (_EventEmitter) {
|
|
30
30
|
(0, _inherits2.default)(Popper, _EventEmitter);
|
|
31
31
|
var _super = _createSuper(Popper);
|
|
32
32
|
function Popper(button, option) {
|
|
@@ -266,5 +266,4 @@ var Popper = /*#__PURE__*/function (_EventEmitter) {
|
|
|
266
266
|
}]);
|
|
267
267
|
return Popper;
|
|
268
268
|
}(_eventemitter.EventEmitter);
|
|
269
|
-
exports.Popper = Popper;
|
|
270
269
|
(0, _defineProperty2.default)(Popper, "conflictPopperList", []);
|
package/lib/utils/screenfull.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-component",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.1",
|
|
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.
|
|
30
|
-
"@antv/l7-utils": "2.
|
|
29
|
+
"@antv/l7-core": "2.20.1",
|
|
30
|
+
"@antv/l7-utils": "2.20.1",
|
|
31
31
|
"@babel/runtime": "^7.7.7",
|
|
32
32
|
"eventemitter3": "^4.0.0",
|
|
33
33
|
"inversify": "^5.0.1",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"supercluster": "^7.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@antv/l7-layers": "2.
|
|
39
|
-
"@antv/l7-test-utils": "2.
|
|
38
|
+
"@antv/l7-layers": "2.20.1",
|
|
39
|
+
"@antv/l7-test-utils": "2.20.1",
|
|
40
40
|
"gcoord": "^0.3.2",
|
|
41
41
|
"less": "^4.1.3"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9cf19c5a23723463d852a905b8a8230abbe96c72",
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
}
|