Strategy space appears closed when not properly initialized
This commit is contained in:
1 parent
dcd9bde192
commit
8d9f4c4333
2 files changed
+13
-1
No files matched your search
@@ -43,7 +43,14 @@
|
||||
|
||||
function initialize () {
|
||||
thisObject.container.frame.position.x = 0
|
||||
thisObject.container.frame.position.y = browserCanvas.height * 55 / 100 - COCKPIT_SPACE_HEIGHT
|
||||
|
||||
let INITIAL_POSITION
|
||||
if (canvas.strategySpace.isInitialized === true) {
|
||||
INITIAL_POSITION = 55
|
||||
} else {
|
||||
INITIAL_POSITION = 100
|
||||
}
|
||||
thisObject.container.frame.position.y = browserCanvas.height * INITIAL_POSITION / 100 - COCKPIT_SPACE_HEIGHT
|
||||
|
||||
canvasBrowserResizedEventSubscriptionId = window.canvasApp.eventHandler.listenToEvent('Browser Resized', resize)
|
||||
selfMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick)
|
||||
|
||||
@@ -9,6 +9,7 @@ function newStrategySpace () {
|
||||
iconByPartType: undefined,
|
||||
workspace: undefined,
|
||||
isDeployed: false,
|
||||
isInitialized: false,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
makeVisible: makeVisible,
|
||||
@@ -35,6 +36,10 @@ function newStrategySpace () {
|
||||
|
||||
loadIconCollection()
|
||||
buildIconByPartTypeMap()
|
||||
|
||||
if (thisObject.strategizerGateway.strategizerData !== undefined) {
|
||||
thisObject.isInitialized = true
|
||||
}
|
||||
}
|
||||
|
||||
function buildIconByPartTypeMap () {
|
||||
|
||||
Reference in new issue
Block a user