@antv/l7-layers 2.11.0 → 2.11.2

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.
@@ -179,8 +179,8 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
179
179
  while (1) {
180
180
  switch (_context.prev = _context.next) {
181
181
  case 0:
182
- this.updateTexture();
183
182
  this.iconService.on('imageUpdate', this.updateTexture);
183
+ this.updateTexture();
184
184
  _ref2 = this.layer.getLayerConfig(), _ref2$unit = _ref2.unit, unit = _ref2$unit === void 0 ? 'l7size' : _ref2$unit;
185
185
  version = this.mapService.version;
186
186
 
@@ -50,10 +50,13 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
50
50
  min: 'linear mipmap nearest',
51
51
  mipmap: true
52
52
  }); // 更新完纹理后在更新的图层的时候需要更新所有的图层
53
+ // this.layer.layerModelNeedUpdate = true;
53
54
 
54
55
 
55
- _this.layerService.throttleRenderLayers();
56
-
56
+ setTimeout(function () {
57
+ // 延迟渲染
58
+ _this.layerService.throttleRenderLayers();
59
+ });
57
60
  return;
58
61
  }
59
62
 
@@ -142,9 +145,10 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
142
145
  while (1) {
143
146
  switch (_context.prev = _context.next) {
144
147
  case 0:
145
- this.registerBuiltinAttributes();
148
+ this.iconService.off('imageUpdate', this.updateTexture);
149
+ this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
150
+
146
151
  this.updateTexture();
147
- this.iconService.on('imageUpdate', this.updateTexture);
148
152
  _context.next = 5;
149
153
  return this.buildModels();
150
154
 
@@ -198,8 +198,8 @@ var FillImageModel = /*#__PURE__*/function (_BaseModel) {
198
198
  while (1) {
199
199
  switch (_context.prev = _context.next) {
200
200
  case 0:
201
- this.updateTexture();
202
201
  this.iconService.on('imageUpdate', this.updateTexture);
202
+ this.updateTexture();
203
203
  _ref2 = this.layer.getLayerConfig(), _ref2$unit = _ref2.unit, unit = _ref2$unit === void 0 ? 'l7size' : _ref2$unit;
204
204
  version = this.mapService.version;
205
205
 
@@ -70,10 +70,13 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
70
70
  min: 'linear mipmap nearest',
71
71
  mipmap: true
72
72
  }); // 更新完纹理后在更新的图层的时候需要更新所有的图层
73
+ // this.layer.layerModelNeedUpdate = true;
73
74
 
74
75
 
75
- _this.layerService.throttleRenderLayers();
76
-
76
+ setTimeout(function () {
77
+ // 延迟渲染
78
+ _this.layerService.throttleRenderLayers();
79
+ });
77
80
  return;
78
81
  }
79
82
 
@@ -161,9 +164,10 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
161
164
  while (1) {
162
165
  switch (_context.prev = _context.next) {
163
166
  case 0:
164
- this.registerBuiltinAttributes();
167
+ this.iconService.off('imageUpdate', this.updateTexture);
168
+ this.iconService.on('imageUpdate', this.updateTexture); // this.registerBuiltinAttributes();
169
+
165
170
  this.updateTexture();
166
- this.iconService.on('imageUpdate', this.updateTexture);
167
171
  _context.next = 5;
168
172
  return this.buildModels();
169
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-layers",
3
- "version": "2.11.0",
3
+ "version": "2.11.2",
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.0",
31
- "@antv/l7-maps": "2.11.0",
32
- "@antv/l7-source": "2.11.0",
33
- "@antv/l7-utils": "2.11.0",
30
+ "@antv/l7-core": "2.11.2",
31
+ "@antv/l7-maps": "2.11.2",
32
+ "@antv/l7-source": "2.11.2",
33
+ "@antv/l7-utils": "2.11.2",
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": "ef67b8e74cb940ab6e150782d70b81678de4609d",
64
+ "gitHead": "736a5ea590dca72c2ac2b0ded9f371ad4c95a72a",
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  }