Renamed 'MapView' to 'MapViewport'. Added documentation to the maps module.

This commit is contained in:
2019-12-09 18:15:28 +01:00
parent 60e28f8fe5
commit 65fac2f406
16 changed files with 638 additions and 151 deletions
+12 -1
View File
@@ -11,6 +11,9 @@ import { MapList } from './maplist.js'
* MapApp is responsible for showing fullscreen
* map applications.
*
* @export
* @class MapApp
* @extends {PIXIApp}
*/
export default class MapApp extends PIXIApp {
constructor(opts = {}) {
@@ -191,9 +194,9 @@ export default class MapApp extends PIXIApp {
}
selectMap(key) {
if (this.debug) console.log('Select map', key, result)
let result = this.mapList.select(key)
console.log('Select map', key, result)
if (result && this.mapLayer) {
this.mapLayer.changeMap(this.mapList.map)
}
@@ -226,6 +229,14 @@ export default class MapApp extends PIXIApp {
this.onTransform.call(this, event)
}
/**
*
* Called when the mapLayer changed the map.
*
* @private
* @param {*} lastMap
* @memberof MapApp
*/
_mapChanged(lastMap) {
if (lastMap) {
lastMap.flushHandlers()