@antv/l7-component
Advanced tools
Comparing version 2.21.0 to 2.21.1
@@ -58,3 +58,2 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
} | ||
case 'mousemove': | ||
@@ -125,8 +124,6 @@ case 'touchmove': | ||
_defineProperty(_assertThisInitialized(_this), "getMaskLayer", function () { | ||
console.log(_this.getMaskGeoData()); | ||
return new PolygonLayer({ | ||
visible: false | ||
}).source({ | ||
type: 'FeatureCollection', | ||
features: [] | ||
}).shape('fill').color('red').style({ | ||
}).source(_this.getMaskGeoData()).shape('fill').color('red').style({ | ||
opacity: 0.1 | ||
@@ -209,9 +206,4 @@ }); | ||
this.maskLayer = this.getMaskLayer(); | ||
this.updateMask(); | ||
this.registerEvent(); | ||
// 给图层挂载掩膜 | ||
this.addMaskToLayers(layers, false); | ||
this.addMaskToLayers(rightLayers, true); | ||
// 添加掩膜图层到 scene | ||
@@ -221,2 +213,6 @@ var layerContainer = createLayerContainer(sceneContainer); | ||
this.scene.addLayer(this.maskLayer); | ||
// 给图层挂载掩膜 | ||
this.addMaskToLayers(layers, false); | ||
this.addMaskToLayers(rightLayers, true); | ||
this.emit('add', this); | ||
@@ -223,0 +219,0 @@ return this; |
@@ -66,3 +66,2 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
} | ||
this.mapsService.on('camerachange', this.setContainerSize.bind(this)); // amap1.x 更新事件 | ||
@@ -69,0 +68,0 @@ this.mapsService.on('viewchange', this.setContainerSize.bind(this)); // amap2.0 更新事件 |
@@ -6,6 +6,4 @@ import type { ILngLat, IMarkerContainerAndBounds, IMarkerOption, IPoint, IPopup, L7Container } from '@antv/l7-core'; | ||
private markerOption; | ||
private defaultMarker; | ||
private popup; | ||
private mapsService; | ||
private sceneSerive; | ||
private lngLat; | ||
@@ -12,0 +10,0 @@ private scene; |
@@ -103,12 +103,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
value: function addTo(scene) { | ||
// this.remove(); | ||
this.scene = scene; | ||
this.mapsService = scene.mapService; | ||
this.sceneSerive = scene.sceneService; | ||
var element = this.markerOption.element; | ||
// this.sceneSerive.getSceneContainer().appendChild(element as HTMLElement); | ||
this.mapsService.getMarkerContainer().appendChild(element); | ||
this.registerMarkerEvent(element); | ||
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现 | ||
// this.mapsService.on('zoomchange', this.updatePositionWhenZoom); | ||
this.mapsService.on('camerachange', this.update); // 注册高德1.x 的地图事件监听 | ||
@@ -128,3 +123,2 @@ this.update(); | ||
this.mapsService.off('moveend', this.update); | ||
// this.mapsService.off('zoomchange', this.update); | ||
this.mapsService.off('camerachange', this.update); | ||
@@ -423,3 +417,2 @@ } | ||
if (!element) { | ||
this.defaultMarker = true; | ||
element = DOM.create('div'); | ||
@@ -426,0 +419,0 @@ this.markerOption.element = element; |
@@ -64,3 +64,2 @@ "use strict"; | ||
} | ||
case 'mousemove': | ||
@@ -131,8 +130,6 @@ case 'touchmove': | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getMaskLayer", function () { | ||
console.log(_this.getMaskGeoData()); | ||
return new _l7Layers.PolygonLayer({ | ||
visible: false | ||
}).source({ | ||
type: 'FeatureCollection', | ||
features: [] | ||
}).shape('fill').color('red').style({ | ||
}).source(_this.getMaskGeoData()).shape('fill').color('red').style({ | ||
opacity: 0.1 | ||
@@ -215,9 +212,4 @@ }); | ||
this.maskLayer = this.getMaskLayer(); | ||
this.updateMask(); | ||
this.registerEvent(); | ||
// 给图层挂载掩膜 | ||
this.addMaskToLayers(layers, false); | ||
this.addMaskToLayers(rightLayers, true); | ||
// 添加掩膜图层到 scene | ||
@@ -227,2 +219,6 @@ var layerContainer = (0, _l7Core.createLayerContainer)(sceneContainer); | ||
this.scene.addLayer(this.maskLayer); | ||
// 给图层挂载掩膜 | ||
this.addMaskToLayers(layers, false); | ||
this.addMaskToLayers(rightLayers, true); | ||
this.emit('add', this); | ||
@@ -229,0 +225,0 @@ return this; |
@@ -72,3 +72,2 @@ "use strict"; | ||
} | ||
this.mapsService.on('camerachange', this.setContainerSize.bind(this)); // amap1.x 更新事件 | ||
@@ -75,0 +74,0 @@ this.mapsService.on('viewchange', this.setContainerSize.bind(this)); // amap2.0 更新事件 |
@@ -109,12 +109,7 @@ "use strict"; | ||
value: function addTo(scene) { | ||
// this.remove(); | ||
this.scene = scene; | ||
this.mapsService = scene.mapService; | ||
this.sceneSerive = scene.sceneService; | ||
var element = this.markerOption.element; | ||
// this.sceneSerive.getSceneContainer().appendChild(element as HTMLElement); | ||
this.mapsService.getMarkerContainer().appendChild(element); | ||
this.registerMarkerEvent(element); | ||
//天地图仅监听zoomchange 不注册camerachane,对于平移,在mapsService中实现 | ||
// this.mapsService.on('zoomchange', this.updatePositionWhenZoom); | ||
this.mapsService.on('camerachange', this.update); // 注册高德1.x 的地图事件监听 | ||
@@ -134,3 +129,2 @@ this.update(); | ||
this.mapsService.off('moveend', this.update); | ||
// this.mapsService.off('zoomchange', this.update); | ||
this.mapsService.off('camerachange', this.update); | ||
@@ -429,3 +423,2 @@ } | ||
if (!element) { | ||
this.defaultMarker = true; | ||
element = _l7Utils.DOM.create('div'); | ||
@@ -432,0 +425,0 @@ this.markerOption.element = element; |
{ | ||
"name": "@antv/l7-component", | ||
"version": "2.21.0", | ||
"version": "2.21.1", | ||
"description": "", | ||
@@ -29,4 +29,4 @@ "license": "ISC", | ||
"dependencies": { | ||
"@antv/l7-core": "2.21.0", | ||
"@antv/l7-utils": "2.21.0", | ||
"@antv/l7-core": "2.21.1", | ||
"@antv/l7-utils": "2.21.1", | ||
"@babel/runtime": "^7.7.7", | ||
@@ -37,4 +37,4 @@ "eventemitter3": "^4.0.0", | ||
"devDependencies": { | ||
"@antv/l7-layers": "2.21.0", | ||
"@antv/l7-test-utils": "2.21.0", | ||
"@antv/l7-layers": "2.21.1", | ||
"@antv/l7-test-utils": "2.21.1", | ||
"gcoord": "^0.3.2", | ||
@@ -46,3 +46,3 @@ "less": "^4.1.3" | ||
}, | ||
"gitHead": "7fa1b00b5262c98bb4cceef4eaf87a7b10af7e29" | ||
"gitHead": "1e0d2e5920f479f77095a2c5eddda8a8d7ac9e0f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
610105
12523
+ Added@antv/l7-core@2.21.1(transitive)
+ Added@antv/l7-utils@2.21.1(transitive)
- Removed@antv/l7-core@2.21.0(transitive)
- Removed@antv/l7-utils@2.21.0(transitive)
Updated@antv/l7-core@2.21.1
Updated@antv/l7-utils@2.21.1