@antv/l7-layers 2.11.3 → 2.11.5

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.
@@ -106,7 +106,9 @@ 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((c) => c * 255),
109
+ u_HighlightColor: highlightColorInArray.map(function (c) {
110
+ return c * 255;
111
+ }),
110
112
  u_activeMix: selectMix,
111
113
  u_CurrentSelectedId: pickedColor,
112
114
  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 = 4;
73
+ _context.next = 5;
69
74
  return this.initLayerModels();
70
75
 
71
- case 4:
76
+ case 5:
72
77
  case "end":
73
78
  return _context.stop();
74
79
  }
@@ -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.off('imageUpdate', this.updateTexture);
149
- this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
150
-
148
+ this.iconService.on('imageUpdate', this.updateTexture);
151
149
  this.updateTexture();
152
- _context.next = 5;
150
+ _context.next = 4;
153
151
  return this.buildModels();
154
152
 
155
- case 5:
153
+ case 4:
156
154
  return _context.abrupt("return", _context.sent);
157
155
 
158
- case 6:
156
+ case 5:
159
157
  case "end":
160
158
  return _context.stop();
161
159
  }
@@ -209,10 +209,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
209
209
  switch (_context2.prev = _context2.next) {
210
210
  case 0:
211
211
  // 绑定事件
212
- if (!this.layer.inited) {
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 = {
@@ -120,7 +120,9 @@ 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((c) => c * 255),
123
+ u_HighlightColor: highlightColorInArray.map(function (c) {
124
+ return c * 255;
125
+ }),
124
126
  u_activeMix: selectMix,
125
127
  u_CurrentSelectedId: pickedColor,
126
128
  u_SelectColor: highlightColorInArray.map(function (c) {
@@ -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 = 4;
87
+ _context.next = 5;
83
88
  return this.initLayerModels();
84
89
 
85
- case 4:
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.off('imageUpdate', this.updateTexture);
168
- this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
169
-
167
+ this.iconService.on('imageUpdate', this.updateTexture);
170
168
  this.updateTexture();
171
- _context.next = 5;
169
+ _context.next = 4;
172
170
  return this.buildModels();
173
171
 
174
- case 5:
172
+ case 4:
175
173
  return _context.abrupt("return", _context.sent);
176
174
 
177
- case 6:
175
+ case 5:
178
176
  case "end":
179
177
  return _context.stop();
180
178
  }
@@ -226,10 +226,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
226
226
  switch (_context2.prev = _context2.next) {
227
227
  case 0:
228
228
  // 绑定事件
229
- if (!this.layer.inited) {
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-layers",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
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.3",
31
- "@antv/l7-maps": "2.11.3",
32
- "@antv/l7-source": "2.11.3",
33
- "@antv/l7-utils": "2.11.3",
30
+ "@antv/l7-core": "2.11.5",
31
+ "@antv/l7-maps": "2.11.5",
32
+ "@antv/l7-source": "2.11.5",
33
+ "@antv/l7-utils": "2.11.5",
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": "73291add563699ecf90ea9c39abbc5a5a5cecc2c",
64
+ "gitHead": "b579a9cd07876173c77bd9d880034d8cbbeef87c",
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  }