@antv/l7-scene 2.10.9 → 2.10.15

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/boxSelect.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
2
  import { Scene } from './index';
3
3
  export declare const BoxSelectEventList: string[];
4
- export type BoxSelectOptions = {
4
+ export declare type BoxSelectOptions = {
5
5
  className?: string;
6
6
  };
7
7
  export default class BoxSelect extends EventEmitter {
package/es/index.d.ts CHANGED
@@ -66,7 +66,7 @@ declare class Scene implements IPostProcessingPassPluggable, IMapController, ILa
66
66
  * @param fontPath
67
67
  */
68
68
  addFontFace(fontFamily: string, fontPath: string): void;
69
- addImage(id: string, img: IImage): void;
69
+ addImage(id: string, img: IImage): Promise<void>;
70
70
  hasImage(id: string): boolean;
71
71
  removeImage(id: string): void;
72
72
  addIconFontGlyphs(fontFamily: string, glyphs: IIconFontGlyph[]): void;
package/es/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
4
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
5
  import _createClass from "@babel/runtime/helpers/esm/createClass";
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
7
  import { Logo } from '@antv/l7-component';
6
8
  import { createLayerContainer, createSceneContainer, SceneEventList, TYPES } from '@antv/l7-core';
7
9
  import { MaskLayer } from '@antv/l7-layers';
@@ -278,13 +280,41 @@ var Scene = /*#__PURE__*/function () {
278
280
  }
279
281
  }, {
280
282
  key: "addImage",
281
- value: function addImage(id, img) {
282
- if (!isMini) {
283
- this.iconService.addImage(id, img);
284
- } else {
285
- this.iconService.addImageMini(id, img, this.sceneService);
283
+ value: function () {
284
+ var _addImage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id, img) {
285
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
286
+ while (1) {
287
+ switch (_context.prev = _context.next) {
288
+ case 0:
289
+ if (isMini) {
290
+ _context.next = 5;
291
+ break;
292
+ }
293
+
294
+ _context.next = 3;
295
+ return this.iconService.addImage(id, img);
296
+
297
+ case 3:
298
+ _context.next = 6;
299
+ break;
300
+
301
+ case 5:
302
+ this.iconService.addImageMini(id, img, this.sceneService);
303
+
304
+ case 6:
305
+ case "end":
306
+ return _context.stop();
307
+ }
308
+ }
309
+ }, _callee, this);
310
+ }));
311
+
312
+ function addImage(_x, _x2) {
313
+ return _addImage.apply(this, arguments);
286
314
  }
287
- }
315
+
316
+ return addImage;
317
+ }()
288
318
  }, {
289
319
  key: "hasImage",
290
320
  value: function hasImage(id) {
package/lib/index.js CHANGED
@@ -186,9 +186,9 @@ var Scene = class {
186
186
  });
187
187
  this.fontService.addFontFace(fontFamily, fontPath);
188
188
  }
189
- addImage(id, img) {
189
+ async addImage(id, img) {
190
190
  if (!import_l7_utils.isMini) {
191
- this.iconService.addImage(id, img);
191
+ await this.iconService.addImage(id, img);
192
192
  } else {
193
193
  this.iconService.addImageMini(id, img, this.sceneService);
194
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-scene",
3
- "version": "2.10.9",
3
+ "version": "2.10.15",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -23,12 +23,12 @@
23
23
  "author": "xiaoiver",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "@antv/l7-component": "2.10.9",
27
- "@antv/l7-core": "2.10.9",
28
- "@antv/l7-layers": "2.10.9",
29
- "@antv/l7-maps": "2.10.9",
30
- "@antv/l7-renderer": "2.10.9",
31
- "@antv/l7-utils": "2.10.9",
26
+ "@antv/l7-component": "2.10.15",
27
+ "@antv/l7-core": "2.10.15",
28
+ "@antv/l7-layers": "2.10.15",
29
+ "@antv/l7-maps": "2.10.15",
30
+ "@antv/l7-renderer": "2.10.15",
31
+ "@antv/l7-utils": "2.10.15",
32
32
  "@babel/runtime": "^7.7.7",
33
33
  "eventemitter3": "^4.0.7",
34
34
  "inversify": "^5.0.1",
@@ -36,9 +36,9 @@
36
36
  "reflect-metadata": "^0.1.13"
37
37
  },
38
38
  "devDependencies": {
39
- "@antv/l7-test-utils": "2.10.9"
39
+ "@antv/l7-test-utils": "2.10.15"
40
40
  },
41
- "gitHead": "9fe64ef00875f4d96771542c16842468e61a8ef4",
41
+ "gitHead": "b567d8c716b042eeb7ab8e05d7e5e0f666469f98",
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  }