Skip to content

Commit

Permalink
chore: type throttle
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed May 17, 2024
1 parent 87a7e8b commit 5e4a474
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/services/layer/LayerService.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { DebouncedFunc } from '@antv/l7-utils';
import { lodashUtil, rgb2arr } from '@antv/l7-utils';
import { EventEmitter } from 'eventemitter3';
import type { L7Container } from '../../inversify.config';
Expand Down Expand Up @@ -42,11 +43,11 @@ export default class LayerService extends EventEmitter<LayerServiceEvent> implem
super();
}

public reRender = throttle(() => {
public reRender: DebouncedFunc<() => void> = throttle(() => {
this.renderLayers();
}, 32);

public throttleRenderLayers = throttle(() => {
public throttleRenderLayers: DebouncedFunc<() => void> = throttle(() => {
this.renderLayers();
}, 16);

Expand Down

0 comments on commit 5e4a474

Please sign in to comment.