Full code cleanup

This commit is contained in:
Pieter Vander Vennet 2021-11-07 16:34:51 +01:00
parent 8e6ee8c87f
commit bd21212eba
246 changed files with 19418 additions and 11729 deletions

View file

@ -19,7 +19,7 @@ export default class TilesourceConfig {
this.minzoom = config.minZoom ?? 0
this.maxzoom = config.maxZoom ?? 999
this.defaultState = config.defaultState ?? true;
if(this.id === undefined){
if (this.id === undefined) {
throw "An id is obligated"
}
if (this.minzoom > this.maxzoom) {
@ -34,7 +34,7 @@ export default class TilesourceConfig {
if (this.source.indexOf("{zoom}") >= 0) {
throw "Invalid source url: use {z} instead of {zoom} (at " + ctx + ".source)"
}
if(!this.defaultState && config.name === undefined){
if (!this.defaultState && config.name === undefined) {
throw "Disabling an overlay without a name is not possible"
}
}