Splash Screen Improved
This commit is contained in:
1 parent
65f1de7041
commit
04b428f515
2 files changed
+9
-18
No files matched your search
@@ -69,26 +69,16 @@ function newWorkspace () {
|
||||
|
||||
async function initialize () {
|
||||
try {
|
||||
let user = window.localStorage.getItem(LOGGED_IN_USER_LOCAL_STORAGE_KEY)
|
||||
if (user === null) {
|
||||
return
|
||||
}
|
||||
user = JSON.parse(user)
|
||||
let savedWorkspace = window.localStorage.getItem(CANVAS_APP_NAME + '.' + 'Workspace')
|
||||
|
||||
let idAtStrategizer = window.localStorage.getItem(CANVAS_APP_NAME + '.' + 'Strategizer Gateway' + '.' + user.alias)
|
||||
let savedWorkspace = window.localStorage.getItem(CANVAS_APP_NAME + '.' + 'Workspace' + '.' + user.alias)
|
||||
|
||||
if (savedWorkspace === null || idAtStrategizer === null) {
|
||||
if (savedWorkspace === null) {
|
||||
thisObject.workspaceNode.type = 'Workspace'
|
||||
thisObject.workspaceNode.name = 'My Workspace'
|
||||
functionLibraryUiObjectsFromNodes.createUiObjectFromNode(thisObject.workspaceNode, undefined, undefined)
|
||||
spawnPosition.y = spawnPosition.y + 250
|
||||
initializeLoadingFromStrategizer()
|
||||
} else {
|
||||
thisObject.workspaceNode = JSON.parse(savedWorkspace)
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
|
||||
thisObject.enabled = true
|
||||
}
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
|
||||
thisObject.enabled = true
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err.stack) }
|
||||
}
|
||||
@@ -131,7 +121,7 @@ function newWorkspace () {
|
||||
user = JSON.parse(user)
|
||||
|
||||
let textToSave = stringifyWorkspace()
|
||||
window.localStorage.setItem(CANVAS_APP_NAME + '.' + 'Workspace' + '.' + user.alias, textToSave)
|
||||
window.localStorage.setItem(CANVAS_APP_NAME + '.' + 'Workspace', textToSave)
|
||||
}
|
||||
|
||||
function stringifyWorkspace (removePersonalData) {
|
||||
|
||||
+4
-3
@@ -57,13 +57,14 @@ function newSplashScreen () {
|
||||
function draw () {
|
||||
if (splashScreenNeeded === false) {
|
||||
stepsInitializationCounter = 100
|
||||
canDrawLogo = false
|
||||
|
||||
fadeOutCounter++
|
||||
|
||||
if (fadeOutCounter > 20) {
|
||||
if (fadeOutCounter > 2) {
|
||||
return
|
||||
}
|
||||
opacity = opacity - 0.1
|
||||
opacity = opacity - 1
|
||||
}
|
||||
|
||||
thisObject.container.frame.draw(false, false)
|
||||
@@ -100,7 +101,7 @@ function newSplashScreen () {
|
||||
/* Second the % of Advance. */
|
||||
|
||||
let label = '' + Math.trunc(stepsInitializationCounter) + ' %'
|
||||
stepsInitializationCounter = stepsInitializationCounter + 2.0
|
||||
stepsInitializationCounter = stepsInitializationCounter + 5.0
|
||||
|
||||
if (stepsInitializationCounter > 99) {
|
||||
splashScreenNeeded = false
|
||||
|
||||
Reference in new issue
Block a user