Continued refactoring of the maps library.
This commit is contained in:
+5
-10
@@ -105,7 +105,7 @@ export default class MapApp extends PIXIApp {
|
||||
super.setup()
|
||||
|
||||
// TODO get access to fps display
|
||||
let fpsDisplay
|
||||
let fpsDisplay = null
|
||||
this.stage.children.forEach(element => {
|
||||
if (element.refreshFps) fpsDisplay = element
|
||||
})
|
||||
@@ -114,8 +114,7 @@ export default class MapApp extends PIXIApp {
|
||||
|
||||
this.ui = new PIXI.Container()
|
||||
this.scene.addChild(this.ui)
|
||||
|
||||
if (this.fpsLogging && fpsDisplay) this.ui.addChild(fpsDisplay)
|
||||
if (this.fpsLogging != null && fpsDisplay != null) this.ui.addChild(fpsDisplay)
|
||||
|
||||
if (this.coordsLogging) {
|
||||
this.coordsDisplay = new CoordinateDisplay(this)
|
||||
@@ -216,10 +215,11 @@ export default class MapApp extends PIXIApp {
|
||||
lastMap.flushHandlers()
|
||||
}
|
||||
|
||||
this.map.onTransform.add(this.transformed.bind(this))
|
||||
|
||||
this.transformed()
|
||||
this.onMapChanged.call(this, this.map)
|
||||
|
||||
this.map.onTransform.add(this.transformed.bind(this))
|
||||
|
||||
|
||||
if (this.ui && this.ui.parent) {
|
||||
const parent = this.ui.parent
|
||||
@@ -249,11 +249,6 @@ export default class MapApp extends PIXIApp {
|
||||
this.overlayElements.set(layer, obj)
|
||||
}
|
||||
|
||||
|
||||
addMapOverlay(layer) {
|
||||
this.mapLayer.place(layer)
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the current coordinates to the clipboard.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user