Full code cleanup

This commit is contained in:
Pieter Vander Vennet 2022-01-26 21:40:38 +01:00
parent 3a4a2a2016
commit fa971ffbbf
300 changed files with 16352 additions and 19284 deletions

View file

@ -41,7 +41,7 @@ export default class SaveTileToLocalStorageActor {
})
}
public LoadTilesFromDisk(currentBounds: UIEventSource<BBox>, location: UIEventSource<Loc>,
registerFreshness: (tileId: number, freshness: Date) => void,
registerTile: ((src: FeatureSource & Tiled) => void)) {
@ -55,7 +55,7 @@ export default class SaveTileToLocalStorageActor {
}
currentBounds.addCallbackAndRunD(bbox => {
if(self._layer.minzoomVisible > location.data.zoom){
if (self._layer.minzoomVisible > location.data.zoom) {
// Not enough zoom
return;
}
@ -119,9 +119,9 @@ export default class SaveTileToLocalStorageActor {
}
private SetIdb(tileIndex, data) {
try{
try {
IdbLocalStorage.SetDirectly(this._layer.id + "_" + tileIndex, data)
}catch(e){
} catch (e) {
console.error("Could not save tile to indexed-db: ", e, "tileIndex is:", tileIndex, "for layer", this._layer.id)
}
}