@antv/l7-layers 2.11.2 → 2.11.4
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/plugins/PixelPickingPlugin.js +1 -3
- package/es/point/index.js +7 -2
- package/es/point/models/image.js +4 -6
- package/es/point/models/text.js +1 -4
- package/es/tile/tileFactory/index.js +2 -0
- package/es/tile/tileLayer/BaseLayer.js +2 -2
- package/lib/plugins/PixelPickingPlugin.js +1 -3
- package/lib/point/index.js +7 -2
- package/lib/point/models/image.js +4 -6
- package/lib/point/models/text.js +1 -4
- package/lib/tile/tileFactory/index.js +2 -0
- package/lib/tile/tileLayer/BaseLayer.js +2 -2
- package/package.json +6 -6
|
@@ -106,9 +106,7 @@ var PixelPickingPlugin = (_dec = injectable(), _dec(_class = /*#__PURE__*/functi
|
|
|
106
106
|
return model.addUniforms({
|
|
107
107
|
u_PickingStage: PickingStage.HIGHLIGHT,
|
|
108
108
|
u_PickingColor: pickedColor,
|
|
109
|
-
u_HighlightColor: highlightColorInArray.map(
|
|
110
|
-
return c * 255;
|
|
111
|
-
}),
|
|
109
|
+
// u_HighlightColor: highlightColorInArray.map((c) => c * 255),
|
|
112
110
|
u_activeMix: selectMix,
|
|
113
111
|
u_CurrentSelectedId: pickedColor,
|
|
114
112
|
u_SelectColor: highlightColorInArray.map(function (c) {
|
package/es/point/index.js
CHANGED
|
@@ -64,11 +64,16 @@ var PointLayer = /*#__PURE__*/function (_BaseLayer) {
|
|
|
64
64
|
switch (_context.prev = _context.next) {
|
|
65
65
|
case 0:
|
|
66
66
|
modelType = this.getModelType();
|
|
67
|
+
|
|
68
|
+
if (this.layerModel) {
|
|
69
|
+
this.layerModel.clearModels();
|
|
70
|
+
}
|
|
71
|
+
|
|
67
72
|
this.layerModel = new PointModels[modelType](this);
|
|
68
|
-
_context.next =
|
|
73
|
+
_context.next = 5;
|
|
69
74
|
return this.initLayerModels();
|
|
70
75
|
|
|
71
|
-
case
|
|
76
|
+
case 5:
|
|
72
77
|
case "end":
|
|
73
78
|
return _context.stop();
|
|
74
79
|
}
|
package/es/point/models/image.js
CHANGED
|
@@ -145,17 +145,15 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
145
145
|
while (1) {
|
|
146
146
|
switch (_context.prev = _context.next) {
|
|
147
147
|
case 0:
|
|
148
|
-
this.iconService.
|
|
149
|
-
this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
|
|
150
|
-
|
|
148
|
+
this.iconService.on('imageUpdate', this.updateTexture);
|
|
151
149
|
this.updateTexture();
|
|
152
|
-
_context.next =
|
|
150
|
+
_context.next = 4;
|
|
153
151
|
return this.buildModels();
|
|
154
152
|
|
|
155
|
-
case
|
|
153
|
+
case 4:
|
|
156
154
|
return _context.abrupt("return", _context.sent);
|
|
157
155
|
|
|
158
|
-
case
|
|
156
|
+
case 5:
|
|
159
157
|
case "end":
|
|
160
158
|
return _context.stop();
|
|
161
159
|
}
|
package/es/point/models/text.js
CHANGED
|
@@ -209,10 +209,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
209
209
|
switch (_context2.prev = _context2.next) {
|
|
210
210
|
case 0:
|
|
211
211
|
// 绑定事件
|
|
212
|
-
|
|
213
|
-
this.bindEvent();
|
|
214
|
-
}
|
|
215
|
-
|
|
212
|
+
this.bindEvent();
|
|
216
213
|
this.extent = this.textExtent();
|
|
217
214
|
_ref3 = this.layer.getLayerConfig(), _ref3$textAnchor = _ref3.textAnchor, textAnchor = _ref3$textAnchor === void 0 ? 'center' : _ref3$textAnchor, _ref3$textAllowOverla = _ref3.textAllowOverlap, textAllowOverlap = _ref3$textAllowOverla === void 0 ? true : _ref3$textAllowOverla;
|
|
218
215
|
this.preTextStyle = {
|
|
@@ -75,12 +75,12 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
75
75
|
var _this$parent$getLayer = this.parent.getLayerConfig(),
|
|
76
76
|
visible = _this$parent$getLayer.visible;
|
|
77
77
|
|
|
78
|
-
if (zoom <
|
|
78
|
+
if (zoom < 2 && visible) {
|
|
79
79
|
this.parent.updateLayerConfig({
|
|
80
80
|
visible: false
|
|
81
81
|
});
|
|
82
82
|
this.layerService.reRender();
|
|
83
|
-
} else if (zoom >=
|
|
83
|
+
} else if (zoom >= 2 && !visible) {
|
|
84
84
|
this.parent.updateLayerConfig({
|
|
85
85
|
visible: true
|
|
86
86
|
});
|
|
@@ -120,9 +120,7 @@ var PixelPickingPlugin = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#
|
|
|
120
120
|
return model.addUniforms({
|
|
121
121
|
u_PickingStage: PickingStage.HIGHLIGHT,
|
|
122
122
|
u_PickingColor: pickedColor,
|
|
123
|
-
u_HighlightColor: highlightColorInArray.map(
|
|
124
|
-
return c * 255;
|
|
125
|
-
}),
|
|
123
|
+
// u_HighlightColor: highlightColorInArray.map((c) => c * 255),
|
|
126
124
|
u_activeMix: selectMix,
|
|
127
125
|
u_CurrentSelectedId: pickedColor,
|
|
128
126
|
u_SelectColor: highlightColorInArray.map(function (c) {
|
package/lib/point/index.js
CHANGED
|
@@ -78,11 +78,16 @@ var PointLayer = /*#__PURE__*/function (_BaseLayer) {
|
|
|
78
78
|
switch (_context.prev = _context.next) {
|
|
79
79
|
case 0:
|
|
80
80
|
modelType = this.getModelType();
|
|
81
|
+
|
|
82
|
+
if (this.layerModel) {
|
|
83
|
+
this.layerModel.clearModels();
|
|
84
|
+
}
|
|
85
|
+
|
|
81
86
|
this.layerModel = new _index.default[modelType](this);
|
|
82
|
-
_context.next =
|
|
87
|
+
_context.next = 5;
|
|
83
88
|
return this.initLayerModels();
|
|
84
89
|
|
|
85
|
-
case
|
|
90
|
+
case 5:
|
|
86
91
|
case "end":
|
|
87
92
|
return _context.stop();
|
|
88
93
|
}
|
|
@@ -164,17 +164,15 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
164
164
|
while (1) {
|
|
165
165
|
switch (_context.prev = _context.next) {
|
|
166
166
|
case 0:
|
|
167
|
-
this.iconService.
|
|
168
|
-
this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
|
|
169
|
-
|
|
167
|
+
this.iconService.on('imageUpdate', this.updateTexture);
|
|
170
168
|
this.updateTexture();
|
|
171
|
-
_context.next =
|
|
169
|
+
_context.next = 4;
|
|
172
170
|
return this.buildModels();
|
|
173
171
|
|
|
174
|
-
case
|
|
172
|
+
case 4:
|
|
175
173
|
return _context.abrupt("return", _context.sent);
|
|
176
174
|
|
|
177
|
-
case
|
|
175
|
+
case 5:
|
|
178
176
|
case "end":
|
|
179
177
|
return _context.stop();
|
|
180
178
|
}
|
package/lib/point/models/text.js
CHANGED
|
@@ -226,10 +226,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
226
226
|
switch (_context2.prev = _context2.next) {
|
|
227
227
|
case 0:
|
|
228
228
|
// 绑定事件
|
|
229
|
-
|
|
230
|
-
this.bindEvent();
|
|
231
|
-
}
|
|
232
|
-
|
|
229
|
+
this.bindEvent();
|
|
233
230
|
this.extent = this.textExtent();
|
|
234
231
|
_ref3 = this.layer.getLayerConfig(), _ref3$textAnchor = _ref3.textAnchor, textAnchor = _ref3$textAnchor === void 0 ? 'center' : _ref3$textAnchor, _ref3$textAllowOverla = _ref3.textAllowOverlap, textAllowOverlap = _ref3$textAllowOverla === void 0 ? true : _ref3$textAllowOverla;
|
|
235
232
|
this.preTextStyle = {
|
|
@@ -91,12 +91,12 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
91
91
|
var _this$parent$getLayer = this.parent.getLayerConfig(),
|
|
92
92
|
visible = _this$parent$getLayer.visible;
|
|
93
93
|
|
|
94
|
-
if (zoom <
|
|
94
|
+
if (zoom < 2 && visible) {
|
|
95
95
|
this.parent.updateLayerConfig({
|
|
96
96
|
visible: false
|
|
97
97
|
});
|
|
98
98
|
this.layerService.reRender();
|
|
99
|
-
} else if (zoom >=
|
|
99
|
+
} else if (zoom >= 2 && !visible) {
|
|
100
100
|
this.parent.updateLayerConfig({
|
|
101
101
|
visible: true
|
|
102
102
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-layers",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4",
|
|
4
4
|
"description": "L7's collection of built-in layers",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@antv/async-hook": "^2.2.9",
|
|
30
|
-
"@antv/l7-core": "2.11.
|
|
31
|
-
"@antv/l7-maps": "2.11.
|
|
32
|
-
"@antv/l7-source": "2.11.
|
|
33
|
-
"@antv/l7-utils": "2.11.
|
|
30
|
+
"@antv/l7-core": "2.11.4",
|
|
31
|
+
"@antv/l7-maps": "2.11.4",
|
|
32
|
+
"@antv/l7-source": "2.11.4",
|
|
33
|
+
"@antv/l7-utils": "2.11.4",
|
|
34
34
|
"@babel/runtime": "^7.7.7",
|
|
35
35
|
"@mapbox/martini": "^0.2.0",
|
|
36
36
|
"@turf/clone": "^6.5.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/gl-matrix": "^2.4.5",
|
|
62
62
|
"@types/lodash": "^4.14.138"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "ba7891204096a2d565fffdf27210ed98e7d26ebf",
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
}
|