mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-02-01 14:33:45 +00:00
Debounce loading in LoadingService instead of using a sample interval
This commit is contained in:
parent
537b731c9d
commit
89e5d3c13d
@ -39,7 +39,7 @@ export class LoadingService {
|
||||
public taskLoading$(task: string): rx.Observable<boolean> {
|
||||
return this._loaders$.map((loaders: {[key: string]: boolean}): boolean => {
|
||||
return !!loaders[task];
|
||||
}).sample(rx.Observable.interval(50)).distinctUntilChanged();
|
||||
}).debounce(100).distinctUntilChanged();
|
||||
}
|
||||
|
||||
public startLoading(task: string): void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user