Improvement on startup showing boxes more time
This commit is contained in:
1 parent
f88450ddd7
commit
082f388d2c
13 files changed
+36
-18
No files matched your search
@@ -14,7 +14,7 @@ function newUiObjectsFromNodes () {
|
||||
|
||||
return thisObject
|
||||
|
||||
function recreateWorkspace (node, replacingCurrentWorkspace) {
|
||||
function recreateWorkspace (node, replacingCurrentWorkspace, callBackFunction) {
|
||||
mapOfNodes = new Map()
|
||||
tasksToRun = []
|
||||
sessionsToRun = []
|
||||
@@ -145,6 +145,10 @@ function newUiObjectsFromNodes () {
|
||||
// We give a few seconds for the tasks to start
|
||||
setTimeout(runSessions, 10000)
|
||||
}
|
||||
|
||||
if (callBackFunction !== undefined) {
|
||||
callBackFunction() // The recreation of the workspace is complete
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +242,7 @@ function newUiObjectsFromNodes () {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
if (property.name !== previousPropertyName) {
|
||||
setTimeout(createUiObjectFromNode, 1, node[property.name], node, node, positionOffset)
|
||||
createUiObjectFromNode(node[property.name], node, node, positionOffset)
|
||||
previousPropertyName = property.name
|
||||
}
|
||||
}
|
||||
@@ -247,7 +251,7 @@ function newUiObjectsFromNodes () {
|
||||
let nodePropertyArray = node[property.name]
|
||||
for (let m = 0; m < nodePropertyArray.length; m++) {
|
||||
let arrayItem = nodePropertyArray[m]
|
||||
setTimeout(createUiObjectFromNode, 1, arrayItem, node, node, positionOffset)
|
||||
createUiObjectFromNode(arrayItem, node, node, positionOffset)
|
||||
}
|
||||
}
|
||||
break
|
||||
|
||||
@@ -94,23 +94,26 @@ function newWorkspace () {
|
||||
if (err && err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) {
|
||||
canvas.cockpitSpace.setStatus('Could not load the last Workspace used, called "' + lastUsedWorkspace + '". Will switch to the default Workspace instead.', 500, canvas.cockpitSpace.statusTypes.WARNING)
|
||||
thisObject.workspaceNode = getWorkspace() // This is the default workspace that comes with the system.
|
||||
finishInitialization()
|
||||
recreateWorkspace()
|
||||
return
|
||||
}
|
||||
thisObject.workspaceNode = JSON.parse(text)
|
||||
finishInitialization()
|
||||
recreateWorkspace()
|
||||
}
|
||||
} else {
|
||||
thisObject.workspaceNode = getWorkspace() // This is the default workspace that comes with the system.
|
||||
finishInitialization()
|
||||
recreateWorkspace()
|
||||
}
|
||||
|
||||
function recreateWorkspace () {
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode, false, finishInitialization)
|
||||
}
|
||||
|
||||
function finishInitialization () {
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
|
||||
setupEventsServerClients()
|
||||
thisObject.enabled = true
|
||||
canvas.cockpitSpace.initializePosition()
|
||||
|
||||
canvas.splashScreen.initialize()
|
||||
setInterval(saveWorkspace, 60000)
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user