commited for presentation.

This commit is contained in:
2019-12-11 15:29:59 +01:00
parent 65fac2f406
commit a85569e54d
120 changed files with 81240 additions and 622 deletions
+27 -4
View File
@@ -7,8 +7,8 @@
*/
export class MapList {
constructor(active = null, maps = {}) {
this.maps = maps
this.active = active
this._maps = maps
this._active = active
if (Object.keys(maps).length > 0) this.select(active)
}
@@ -37,7 +37,7 @@ export class MapList {
}
if (this.active !== active) {
this.active = active
this._active = active
map = this.maps[active]
}
} else {
@@ -75,7 +75,7 @@ export class MapList {
*/
add(key, map) {
if (this.maps[key] != null) consol.warn('Key already in mapList. The existing key was overwritten.')
if (this.active == null) this.active = key
if (this.active == null) this._active = key
map.name = key
this.maps[key] = map
}
@@ -86,12 +86,35 @@ export class MapList {
*
*@public
* @readonly
* @member {GeoMap}
* @memberof MapList
*/
get map() {
return this.maps && this.maps[this.active] ? this.maps[this.active] : null
}
/**
* Returns the list of addedd cards.
*
* @member {object}
* @readonly
* @memberof MapList
*/
get maps() {
return this._maps
}
/**
* Returns the active key.
*
* @member {string}
* @readonly
* @memberof MapList
*/
get active() {
return this._active
}
/**
* Selects the next map in the map array.
*