@antv/l7-component 2.20.17 → 2.20.19
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/marker.js +3 -6
- package/es/popup/popup.js +5 -4
- package/lib/marker.js +3 -6
- package/lib/popup/popup.js +5 -4
- package/package.json +6 -6
package/es/marker.js
CHANGED
|
@@ -109,7 +109,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
|
|
|
109
109
|
this.mapsService.getMarkerContainer().appendChild(element);
|
|
110
110
|
this.registerMarkerEvent(element);
|
|
111
111
|
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现
|
|
112
|
-
this.mapsService.on('zoomchange', this.updatePositionWhenZoom);
|
|
112
|
+
// this.mapsService.on('zoomchange', this.updatePositionWhenZoom);
|
|
113
113
|
this.mapsService.on('camerachange', this.update); // 注册高德1.x 的地图事件监听
|
|
114
114
|
this.update();
|
|
115
115
|
this.updateDraggable();
|
|
@@ -124,7 +124,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
|
|
|
124
124
|
this.mapsService.off('click', this.onMapClick);
|
|
125
125
|
this.mapsService.off('move', this.update);
|
|
126
126
|
this.mapsService.off('moveend', this.update);
|
|
127
|
-
this.mapsService.off('zoomchange', this.update);
|
|
127
|
+
// this.mapsService.off('zoomchange', this.update);
|
|
128
128
|
this.mapsService.off('camerachange', this.update);
|
|
129
129
|
}
|
|
130
130
|
this.unRegisterMarkerEvent();
|
|
@@ -309,9 +309,6 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
|
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
var map = ev.map;
|
|
312
|
-
var viewHalf = map.getSize();
|
|
313
|
-
viewHalf.x = viewHalf.x / 2;
|
|
314
|
-
viewHalf.y = viewHalf.y / 2;
|
|
315
312
|
var center = ev.center;
|
|
316
313
|
var zoom = ev.zoom;
|
|
317
314
|
var projectedCenter = map.DE(this.lngLat, zoom, center);
|
|
@@ -335,7 +332,6 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
|
|
|
335
332
|
}
|
|
336
333
|
element.style.left = projectedCenter.x + 'px';
|
|
337
334
|
element.style.top = projectedCenter.y + 'px';
|
|
338
|
-
console.log(projectedCenter);
|
|
339
335
|
element.style.transition = 'left 0.25s cubic-bezier(0,0,0.25,1), top 0.25s cubic-bezier(0,0,0.25,1)';
|
|
340
336
|
}
|
|
341
337
|
}
|
|
@@ -411,6 +407,7 @@ var Marker = /*#__PURE__*/function (_EventEmitter) {
|
|
|
411
407
|
}
|
|
412
408
|
element.style.left = pos.x + offsets[0] + 'px';
|
|
413
409
|
element.style.top = pos.y - offsets[1] + 'px';
|
|
410
|
+
console.log(element.style.left);
|
|
414
411
|
}
|
|
415
412
|
}
|
|
416
413
|
}, {
|
package/es/popup/popup.js
CHANGED
|
@@ -199,7 +199,7 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
199
199
|
this.sceneService = scene.get(TYPES.ISceneService);
|
|
200
200
|
this.layerService = scene.get(TYPES.ILayerService);
|
|
201
201
|
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现
|
|
202
|
-
this.mapsService.on('zoomchange', this.updateWhenZoom);
|
|
202
|
+
// this.mapsService.on('zoomchange', this.updateWhenZoom);
|
|
203
203
|
this.mapsService.on('camerachange', this.update);
|
|
204
204
|
this.mapsService.on('viewchange', this.update);
|
|
205
205
|
this.scene = scene;
|
|
@@ -244,7 +244,7 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
244
244
|
this.mapsService.off('camerachange', this.update);
|
|
245
245
|
this.mapsService.off('viewchange', this.update);
|
|
246
246
|
//天地图的缩放事件
|
|
247
|
-
this.mapsService.off('zoomchange', this.updateWhenZoom);
|
|
247
|
+
// this.mapsService.off('zoomchange', this.updateWhenZoom);
|
|
248
248
|
this.updateCloseOnClick(true);
|
|
249
249
|
this.updateCloseOnEsc(true);
|
|
250
250
|
this.updateFollowCursor(true);
|
|
@@ -422,10 +422,11 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
422
422
|
}
|
|
423
423
|
if (this.mapsService) {
|
|
424
424
|
// 防止事件重复监听
|
|
425
|
-
this.mapsService.off('zoonanim', this.updateWhenZoom);
|
|
425
|
+
// this.mapsService.off('zoonanim', this.updateWhenZoom);
|
|
426
426
|
this.mapsService.off('camerachange', this.update);
|
|
427
427
|
this.mapsService.off('viewchange', this.update);
|
|
428
|
-
|
|
428
|
+
|
|
429
|
+
// this.mapsService.on('zoonanim', this.updateWhenZoom);
|
|
429
430
|
this.mapsService.on('camerachange', this.update);
|
|
430
431
|
this.mapsService.on('viewchange', this.update);
|
|
431
432
|
}
|
package/lib/marker.js
CHANGED
|
@@ -116,7 +116,7 @@ var Marker = exports.default = /*#__PURE__*/function (_EventEmitter) {
|
|
|
116
116
|
this.mapsService.getMarkerContainer().appendChild(element);
|
|
117
117
|
this.registerMarkerEvent(element);
|
|
118
118
|
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现
|
|
119
|
-
this.mapsService.on('zoomchange', this.updatePositionWhenZoom);
|
|
119
|
+
// this.mapsService.on('zoomchange', this.updatePositionWhenZoom);
|
|
120
120
|
this.mapsService.on('camerachange', this.update); // 注册高德1.x 的地图事件监听
|
|
121
121
|
this.update();
|
|
122
122
|
this.updateDraggable();
|
|
@@ -131,7 +131,7 @@ var Marker = exports.default = /*#__PURE__*/function (_EventEmitter) {
|
|
|
131
131
|
this.mapsService.off('click', this.onMapClick);
|
|
132
132
|
this.mapsService.off('move', this.update);
|
|
133
133
|
this.mapsService.off('moveend', this.update);
|
|
134
|
-
this.mapsService.off('zoomchange', this.update);
|
|
134
|
+
// this.mapsService.off('zoomchange', this.update);
|
|
135
135
|
this.mapsService.off('camerachange', this.update);
|
|
136
136
|
}
|
|
137
137
|
this.unRegisterMarkerEvent();
|
|
@@ -316,9 +316,6 @@ var Marker = exports.default = /*#__PURE__*/function (_EventEmitter) {
|
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
318
|
var map = ev.map;
|
|
319
|
-
var viewHalf = map.getSize();
|
|
320
|
-
viewHalf.x = viewHalf.x / 2;
|
|
321
|
-
viewHalf.y = viewHalf.y / 2;
|
|
322
319
|
var center = ev.center;
|
|
323
320
|
var zoom = ev.zoom;
|
|
324
321
|
var projectedCenter = map.DE(this.lngLat, zoom, center);
|
|
@@ -342,7 +339,6 @@ var Marker = exports.default = /*#__PURE__*/function (_EventEmitter) {
|
|
|
342
339
|
}
|
|
343
340
|
element.style.left = projectedCenter.x + 'px';
|
|
344
341
|
element.style.top = projectedCenter.y + 'px';
|
|
345
|
-
console.log(projectedCenter);
|
|
346
342
|
element.style.transition = 'left 0.25s cubic-bezier(0,0,0.25,1), top 0.25s cubic-bezier(0,0,0.25,1)';
|
|
347
343
|
}
|
|
348
344
|
}
|
|
@@ -418,6 +414,7 @@ var Marker = exports.default = /*#__PURE__*/function (_EventEmitter) {
|
|
|
418
414
|
}
|
|
419
415
|
element.style.left = pos.x + offsets[0] + 'px';
|
|
420
416
|
element.style.top = pos.y - offsets[1] + 'px';
|
|
417
|
+
console.log(element.style.left);
|
|
421
418
|
}
|
|
422
419
|
}
|
|
423
420
|
}, {
|
package/lib/popup/popup.js
CHANGED
|
@@ -205,7 +205,7 @@ var Popup = exports.default = exports.Popup = /*#__PURE__*/function (_EventEmitt
|
|
|
205
205
|
this.sceneService = scene.get(_l7Core.TYPES.ISceneService);
|
|
206
206
|
this.layerService = scene.get(_l7Core.TYPES.ILayerService);
|
|
207
207
|
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现
|
|
208
|
-
this.mapsService.on('zoomchange', this.updateWhenZoom);
|
|
208
|
+
// this.mapsService.on('zoomchange', this.updateWhenZoom);
|
|
209
209
|
this.mapsService.on('camerachange', this.update);
|
|
210
210
|
this.mapsService.on('viewchange', this.update);
|
|
211
211
|
this.scene = scene;
|
|
@@ -250,7 +250,7 @@ var Popup = exports.default = exports.Popup = /*#__PURE__*/function (_EventEmitt
|
|
|
250
250
|
this.mapsService.off('camerachange', this.update);
|
|
251
251
|
this.mapsService.off('viewchange', this.update);
|
|
252
252
|
//天地图的缩放事件
|
|
253
|
-
this.mapsService.off('zoomchange', this.updateWhenZoom);
|
|
253
|
+
// this.mapsService.off('zoomchange', this.updateWhenZoom);
|
|
254
254
|
this.updateCloseOnClick(true);
|
|
255
255
|
this.updateCloseOnEsc(true);
|
|
256
256
|
this.updateFollowCursor(true);
|
|
@@ -428,10 +428,11 @@ var Popup = exports.default = exports.Popup = /*#__PURE__*/function (_EventEmitt
|
|
|
428
428
|
}
|
|
429
429
|
if (this.mapsService) {
|
|
430
430
|
// 防止事件重复监听
|
|
431
|
-
this.mapsService.off('zoonanim', this.updateWhenZoom);
|
|
431
|
+
// this.mapsService.off('zoonanim', this.updateWhenZoom);
|
|
432
432
|
this.mapsService.off('camerachange', this.update);
|
|
433
433
|
this.mapsService.off('viewchange', this.update);
|
|
434
|
-
|
|
434
|
+
|
|
435
|
+
// this.mapsService.on('zoonanim', this.updateWhenZoom);
|
|
435
436
|
this.mapsService.on('camerachange', this.update);
|
|
436
437
|
this.mapsService.on('viewchange', this.update);
|
|
437
438
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-component",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.19",
|
|
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.20.
|
|
30
|
-
"@antv/l7-utils": "2.20.
|
|
29
|
+
"@antv/l7-core": "2.20.19",
|
|
30
|
+
"@antv/l7-utils": "2.20.19",
|
|
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.20.
|
|
39
|
-
"@antv/l7-test-utils": "2.20.
|
|
38
|
+
"@antv/l7-layers": "2.20.19",
|
|
39
|
+
"@antv/l7-test-utils": "2.20.19",
|
|
40
40
|
"gcoord": "^0.3.2",
|
|
41
41
|
"less": "^4.1.3"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7a7fb59e506d8d970d296fa6efc7e668513a25f6",
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
}
|