@antv/l7-core
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -36,6 +36,4 @@ import 'reflect-metadata'; | ||
container.bind(TYPES.IGlobalConfigService).to(GlobalConfigService).inSingletonScope(); | ||
container.bind(TYPES.IIconService).to(IconService).inSingletonScope(); | ||
container.bind(TYPES.IShaderModuleService).to(ShaderModuleService).inSingletonScope(); | ||
container.bind(TYPES.ILogService).to(LogService).inSingletonScope(); | ||
container.bind(TYPES.IFontService).to(FontService).inSingletonScope(); | ||
decorate(injectable(), EventEmitter); | ||
@@ -81,2 +79,4 @@ container.bind(TYPES.IEventEmitter).to(EventEmitter); | ||
sceneContainer.bind(TYPES.IMarkerService).to(MarkerService).inSingletonScope(); | ||
sceneContainer.bind(TYPES.IIconService).to(IconService).inSingletonScope(); | ||
sceneContainer.bind(TYPES.IFontService).to(FontService).inSingletonScope(); | ||
sceneContainer.bind(TYPES.IPopupService).to(PopupService).inSingletonScope(); | ||
@@ -83,0 +83,0 @@ sceneContainer.bind(TYPES.INormalPass).to(ClearPass).whenTargetNamed('clear'); |
@@ -21,2 +21,5 @@ import { Container } from 'inversify'; | ||
togglePopup(): this; | ||
openPopup(): this; | ||
closePopup(): this; | ||
setElement(el: HTMLElement): this; | ||
} | ||
@@ -23,0 +26,0 @@ export interface IMarkerService { |
@@ -12,2 +12,4 @@ import { Container } from 'inversify'; | ||
isOpen(): boolean; | ||
open(): void; | ||
close(): void; | ||
} | ||
@@ -18,3 +20,4 @@ export interface IPopupService { | ||
init(scene: Container): void; | ||
initPopup(): void; | ||
destroy(): void; | ||
} |
@@ -6,6 +6,9 @@ import { Container } from 'inversify'; | ||
private popup; | ||
private mapsService; | ||
private unAddPopup; | ||
removePopup(popup: IPopup): void; | ||
destroy(): void; | ||
addPopup(popup: IPopup): void; | ||
initPopup(): void; | ||
init(scene: Container): void; | ||
} |
@@ -7,2 +7,3 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import { injectable } from 'inversify'; | ||
import { TYPES } from '../../types'; | ||
var PopupService = (_dec = injectable(), _dec(_class = (_temp = function () { | ||
@@ -14,2 +15,4 @@ function PopupService() { | ||
this.popup = void 0; | ||
this.mapsService = void 0; | ||
this.unAddPopup = void 0; | ||
} | ||
@@ -34,9 +37,22 @@ | ||
popup.addTo(this.scene); | ||
this.popup = popup; | ||
if (this.mapsService.map && this.mapsService.getMarkerContainer()) { | ||
popup.addTo(this.scene); | ||
this.popup = popup; | ||
} else { | ||
this.unAddPopup = popup; | ||
} | ||
} | ||
}, { | ||
key: "initPopup", | ||
value: function initPopup() { | ||
if (this.unAddPopup) { | ||
this.addPopup(this.unAddPopup); | ||
this.unAddPopup = null; | ||
} | ||
} | ||
}, { | ||
key: "init", | ||
value: function init(scene) { | ||
this.scene = scene; | ||
this.mapsService = scene.get(TYPES.IMapService); | ||
} | ||
@@ -43,0 +59,0 @@ }]); |
@@ -26,2 +26,3 @@ import { EventEmitter } from 'eventemitter3'; | ||
private readonly markerService; | ||
private readonly popupService; | ||
/** | ||
@@ -28,0 +29,0 @@ * 是否首次渲染 |
@@ -13,3 +13,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _temp; | ||
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _temp; | ||
@@ -23,3 +23,3 @@ import { DOM } from '@antv/l7-utils'; | ||
import { createRendererContainer } from '../../utils/dom'; | ||
var Scene = (_dec = injectable(), _dec2 = inject(TYPES.SceneID), _dec3 = inject(TYPES.IIconService), _dec4 = inject(TYPES.IFontService), _dec5 = inject(TYPES.IControlService), _dec6 = inject(TYPES.ILogService), _dec7 = inject(TYPES.IGlobalConfigService), _dec8 = inject(TYPES.IMapService), _dec9 = inject(TYPES.ICoordinateSystemService), _dec10 = inject(TYPES.IRendererService), _dec11 = inject(TYPES.ILayerService), _dec12 = inject(TYPES.ICameraService), _dec13 = inject(TYPES.IInteractionService), _dec14 = inject(TYPES.IShaderModuleService), _dec15 = inject(TYPES.IMarkerService), _dec(_class = (_class2 = (_temp = function (_EventEmitter) { | ||
var Scene = (_dec = injectable(), _dec2 = inject(TYPES.SceneID), _dec3 = inject(TYPES.IIconService), _dec4 = inject(TYPES.IFontService), _dec5 = inject(TYPES.IControlService), _dec6 = inject(TYPES.ILogService), _dec7 = inject(TYPES.IGlobalConfigService), _dec8 = inject(TYPES.IMapService), _dec9 = inject(TYPES.ICoordinateSystemService), _dec10 = inject(TYPES.IRendererService), _dec11 = inject(TYPES.ILayerService), _dec12 = inject(TYPES.ICameraService), _dec13 = inject(TYPES.IInteractionService), _dec14 = inject(TYPES.IShaderModuleService), _dec15 = inject(TYPES.IMarkerService), _dec16 = inject(TYPES.IPopupService), _dec(_class = (_class2 = (_temp = function (_EventEmitter) { | ||
_inherits(Scene, _EventEmitter); | ||
@@ -62,2 +62,4 @@ | ||
_initializerDefineProperty(_this, "popupService", _descriptor15, _assertThisInitialized(_this)); | ||
_this.inited = false; | ||
@@ -156,2 +158,4 @@ _this.initPromise = void 0; | ||
_this2.popupService.initPopup(); | ||
_this2.interactionService.init(); | ||
@@ -161,3 +165,3 @@ | ||
case 8: | ||
case 9: | ||
case "end": | ||
@@ -370,4 +374,9 @@ return _context.stop(); | ||
initializer: null | ||
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "popupService", [_dec16], { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
initializer: null | ||
})), _class2)) || _class); | ||
export { Scene as default }; | ||
//# sourceMappingURL=SceneService.js.map |
@@ -80,6 +80,4 @@ "use strict"; | ||
container.bind(_types.TYPES.IGlobalConfigService).to(_ConfigService.default).inSingletonScope(); | ||
container.bind(_types.TYPES.IIconService).to(_IconService.default).inSingletonScope(); | ||
container.bind(_types.TYPES.IShaderModuleService).to(_ShaderModuleService.default).inSingletonScope(); | ||
container.bind(_types.TYPES.ILogService).to(_LogService.default).inSingletonScope(); | ||
container.bind(_types.TYPES.IFontService).to(_FontService.default).inSingletonScope(); | ||
(0, _inversify.decorate)((0, _inversify.injectable)(), _eventemitter.EventEmitter); | ||
@@ -133,2 +131,4 @@ container.bind(_types.TYPES.IEventEmitter).to(_eventemitter.EventEmitter); | ||
sceneContainer.bind(_types.TYPES.IMarkerService).to(_MarkerService.default).inSingletonScope(); | ||
sceneContainer.bind(_types.TYPES.IIconService).to(_IconService.default).inSingletonScope(); | ||
sceneContainer.bind(_types.TYPES.IFontService).to(_FontService.default).inSingletonScope(); | ||
sceneContainer.bind(_types.TYPES.IPopupService).to(_PopupService.default).inSingletonScope(); | ||
@@ -135,0 +135,0 @@ sceneContainer.bind(_types.TYPES.INormalPass).to(_ClearPass.default).whenTargetNamed('clear'); |
@@ -16,2 +16,4 @@ "use strict"; | ||
var _types = require("../../types"); | ||
var _dec, _class, _temp; | ||
@@ -24,2 +26,4 @@ | ||
this.popup = void 0; | ||
this.mapsService = void 0; | ||
this.unAddPopup = void 0; | ||
} | ||
@@ -44,9 +48,22 @@ | ||
popup.addTo(this.scene); | ||
this.popup = popup; | ||
if (this.mapsService.map && this.mapsService.getMarkerContainer()) { | ||
popup.addTo(this.scene); | ||
this.popup = popup; | ||
} else { | ||
this.unAddPopup = popup; | ||
} | ||
} | ||
}, { | ||
key: "initPopup", | ||
value: function initPopup() { | ||
if (this.unAddPopup) { | ||
this.addPopup(this.unAddPopup); | ||
this.unAddPopup = null; | ||
} | ||
} | ||
}, { | ||
key: "init", | ||
value: function init(scene) { | ||
this.scene = scene; | ||
this.mapsService = scene.get(_types.TYPES.IMapService); | ||
} | ||
@@ -53,0 +70,0 @@ }]); |
@@ -48,5 +48,5 @@ "use strict"; | ||
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _temp; | ||
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _temp; | ||
var Scene = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inversify.inject)(_types.TYPES.SceneID), _dec3 = (0, _inversify.inject)(_types.TYPES.IIconService), _dec4 = (0, _inversify.inject)(_types.TYPES.IFontService), _dec5 = (0, _inversify.inject)(_types.TYPES.IControlService), _dec6 = (0, _inversify.inject)(_types.TYPES.ILogService), _dec7 = (0, _inversify.inject)(_types.TYPES.IGlobalConfigService), _dec8 = (0, _inversify.inject)(_types.TYPES.IMapService), _dec9 = (0, _inversify.inject)(_types.TYPES.ICoordinateSystemService), _dec10 = (0, _inversify.inject)(_types.TYPES.IRendererService), _dec11 = (0, _inversify.inject)(_types.TYPES.ILayerService), _dec12 = (0, _inversify.inject)(_types.TYPES.ICameraService), _dec13 = (0, _inversify.inject)(_types.TYPES.IInteractionService), _dec14 = (0, _inversify.inject)(_types.TYPES.IShaderModuleService), _dec15 = (0, _inversify.inject)(_types.TYPES.IMarkerService), _dec(_class = (_class2 = (_temp = function (_EventEmitter) { | ||
var Scene = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inversify.inject)(_types.TYPES.SceneID), _dec3 = (0, _inversify.inject)(_types.TYPES.IIconService), _dec4 = (0, _inversify.inject)(_types.TYPES.IFontService), _dec5 = (0, _inversify.inject)(_types.TYPES.IControlService), _dec6 = (0, _inversify.inject)(_types.TYPES.ILogService), _dec7 = (0, _inversify.inject)(_types.TYPES.IGlobalConfigService), _dec8 = (0, _inversify.inject)(_types.TYPES.IMapService), _dec9 = (0, _inversify.inject)(_types.TYPES.ICoordinateSystemService), _dec10 = (0, _inversify.inject)(_types.TYPES.IRendererService), _dec11 = (0, _inversify.inject)(_types.TYPES.ILayerService), _dec12 = (0, _inversify.inject)(_types.TYPES.ICameraService), _dec13 = (0, _inversify.inject)(_types.TYPES.IInteractionService), _dec14 = (0, _inversify.inject)(_types.TYPES.IShaderModuleService), _dec15 = (0, _inversify.inject)(_types.TYPES.IMarkerService), _dec16 = (0, _inversify.inject)(_types.TYPES.IPopupService), _dec(_class = (_class2 = (_temp = function (_EventEmitter) { | ||
(0, _inherits2.default)(Scene, _EventEmitter); | ||
@@ -73,2 +73,3 @@ | ||
(0, _initializerDefineProperty2.default)(_this, "markerService", _descriptor14, (0, _assertThisInitialized2.default)(_this)); | ||
(0, _initializerDefineProperty2.default)(_this, "popupService", _descriptor15, (0, _assertThisInitialized2.default)(_this)); | ||
_this.inited = false; | ||
@@ -168,2 +169,4 @@ _this.initPromise = void 0; | ||
_this2.popupService.initPopup(); | ||
_this2.interactionService.init(); | ||
@@ -173,3 +176,3 @@ | ||
case 8: | ||
case 9: | ||
case "end": | ||
@@ -381,4 +384,9 @@ return _context.stop(); | ||
initializer: null | ||
}), _descriptor15 = (0, _applyDecoratedDescriptor2.default)(_class2.prototype, "popupService", [_dec16], { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
initializer: null | ||
})), _class2)) || _class); | ||
exports.default = Scene; | ||
//# sourceMappingURL=SceneService.js.map |
{ | ||
"name": "@antv/l7-core", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@antv/l7-utils": "^2.0.1", | ||
"@antv/l7-utils": "^2.0.6", | ||
"@babel/runtime": "^7.7.7", | ||
@@ -50,3 +50,3 @@ "@mapbox/tiny-sdf": "^1.1.1", | ||
}, | ||
"gitHead": "a26c287db8eb47c52f7ea5f88a894ffdea9dfd79", | ||
"gitHead": "8eda4954266b7431f38f39b569b79d9a5cc7a1d7", | ||
"publishConfig": { | ||
@@ -53,0 +53,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1272386
13883
Updated@antv/l7-utils@^2.0.6