fix: 修复冲突

This commit is contained in:
象数 2022-10-14 16:28:23 +08:00
parent 8219b8702f
commit b35edcb4d5
3 changed files with 3 additions and 5 deletions

View File

@ -141,7 +141,6 @@ export default class LayerService implements ILayerService {
} }
this.alreadyInRendering = true; this.alreadyInRendering = true;
this.clear(); this.clear();
console.time('t')
for (const layer of this.layerList) { for (const layer of this.layerList) {
layer.hooks.beforeRenderData.call(); layer.hooks.beforeRenderData.call();
layer.hooks.beforeRender.call(); layer.hooks.beforeRender.call();
@ -170,7 +169,6 @@ export default class LayerService implements ILayerService {
layer.hooks.afterRender.call(); layer.hooks.afterRender.call();
} }
this.alreadyInRendering = false; this.alreadyInRendering = false;
console.timeEnd('t')
} }
public updateLayerRenderList() { public updateLayerRenderList() {

View File

@ -1,7 +1,7 @@
import { TilesetManager } from '@antv/l7-utils'; import { TilesetManager } from '@antv/l7-utils';
import { BBox } from '@turf/helpers'; import { BBox } from '@turf/helpers';
export type DataType = string | object[] | object; export type DataType = string | object[] | object;
export type SourceEventType = 'inited' | 'sourceUpdate' export type SourceEventType = 'inited' | 'sourceUpdate' | 'update'
export interface IParserCfg { export interface IParserCfg {
type: string; type: string;
x?: string; x?: string;

View File

@ -176,7 +176,7 @@ export default class Source extends EventEmitter implements ISource {
}, },
); );
this.dataArrayChanged = true; this.dataArrayChanged = true;
this.emit('sourceUpdate'); this.emit('update');
} }
public getFeatureId(field: string, value: any): number | undefined { public getFeatureId(field: string, value: any): number | undefined {
@ -191,7 +191,7 @@ export default class Source extends EventEmitter implements ISource {
this.dataArrayChanged = false; this.dataArrayChanged = false;
this.initCfg(options); this.initCfg(options);
this.init().then(()=>{ this.init().then(()=>{
this.emit('sourceUpdate') this.emit('update')
}); });
} }