diff --git a/packages/core/src/services/layer/LayerService.ts b/packages/core/src/services/layer/LayerService.ts index ba09f8b8e9..15d536cf06 100644 --- a/packages/core/src/services/layer/LayerService.ts +++ b/packages/core/src/services/layer/LayerService.ts @@ -141,7 +141,6 @@ export default class LayerService implements ILayerService { } this.alreadyInRendering = true; this.clear(); - console.time('t') for (const layer of this.layerList) { layer.hooks.beforeRenderData.call(); layer.hooks.beforeRender.call(); @@ -170,7 +169,6 @@ export default class LayerService implements ILayerService { layer.hooks.afterRender.call(); } this.alreadyInRendering = false; - console.timeEnd('t') } public updateLayerRenderList() { diff --git a/packages/core/src/services/source/ISourceService.ts b/packages/core/src/services/source/ISourceService.ts index d6a33d4ee6..d9a23f4ad1 100644 --- a/packages/core/src/services/source/ISourceService.ts +++ b/packages/core/src/services/source/ISourceService.ts @@ -1,7 +1,7 @@ import { TilesetManager } from '@antv/l7-utils'; import { BBox } from '@turf/helpers'; export type DataType = string | object[] | object; -export type SourceEventType = 'inited' | 'sourceUpdate' +export type SourceEventType = 'inited' | 'sourceUpdate' | 'update' export interface IParserCfg { type: string; x?: string; diff --git a/packages/source/src/source.ts b/packages/source/src/source.ts index 7ccc8a76aa..3ebb6ea9c8 100644 --- a/packages/source/src/source.ts +++ b/packages/source/src/source.ts @@ -176,7 +176,7 @@ export default class Source extends EventEmitter implements ISource { }, ); this.dataArrayChanged = true; - this.emit('sourceUpdate'); + this.emit('update'); } public getFeatureId(field: string, value: any): number | undefined { @@ -191,7 +191,7 @@ export default class Source extends EventEmitter implements ISource { this.dataArrayChanged = false; this.initCfg(options); this.init().then(()=>{ - this.emit('sourceUpdate') + this.emit('update') }); }