Cleanup of unused function

This commit is contained in:
pietervdvn 2021-10-20 00:18:29 +02:00
parent baaf66038d
commit 55937ec0c7
2 changed files with 0 additions and 19 deletions

View file

@ -5,8 +5,6 @@ import State from "../State";
import BaseUIElement from "../UI/BaseUIElement";
import List from "../UI/Base/List";
import Title from "../UI/Base/Title";
import {UIEventSourceTools} from "./UIEventSource";
import AspectedRouting from "./Osm/aspectedRouting";
import {BBox} from "./BBox";
export interface ExtraFuncParams {

View file

@ -337,21 +337,4 @@ export class UIEventSource<T> {
}
)
}
}
export class UIEventSourceTools {
private static readonly _download_cache = new Map<string, UIEventSource<any>>()
public static downloadJsonCached(url: string): UIEventSource<any> {
const cached = UIEventSourceTools._download_cache.get(url)
if (cached !== undefined) {
return cached;
}
const src = new UIEventSource<any>(undefined)
UIEventSourceTools._download_cache.set(url, src)
Utils.downloadJson(url).then(r => src.setData(r))
return src;
}
}