Globals Ready
This commit is contained in:
1 parent
b7d3e6720d
commit
beab0292d7
3 files changed
+34
-7
No files matched your search
@@ -90,6 +90,26 @@ function newAppLoader() {
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
globals()
|
||||
}
|
||||
}
|
||||
|
||||
function globals() {
|
||||
let url = 'ListGlobalFiles'
|
||||
callWebServer(undefined, url, onResponse)
|
||||
|
||||
function onResponse(err, fileList) {
|
||||
let urlArray = []
|
||||
let fileArray = JSON.parse(fileList)
|
||||
for (let i = 0; i < fileArray.length; i++) {
|
||||
let item = fileArray[i]
|
||||
|
||||
project = item[0]
|
||||
fileName = item[1]
|
||||
urlArray.push('Projects' + '/' + project + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
spaces()
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ function newCanvas() {
|
||||
projectInstance.spaces = {}
|
||||
projectInstance.events = {}
|
||||
projectInstance.utilities = {}
|
||||
projectInstance.globals = {}
|
||||
|
||||
projectInstance.events.onMouseWheelMap = new Map()
|
||||
projectInstance.events.onMouseOverMap = new Map()
|
||||
@@ -118,7 +119,7 @@ function newCanvas() {
|
||||
let spaceDefinitionMap = new Map()
|
||||
|
||||
/* Space Instantiation */
|
||||
if (projectDefinition.spaces === undefined) {continue}
|
||||
if (projectDefinition.spaces === undefined) { continue }
|
||||
for (let j = 0; j < projectDefinition.spaces.length; j++) {
|
||||
let spaceDefinition = projectDefinition.spaces[j]
|
||||
projectInstance.spaces[spaceDefinition.propertyName] = eval(spaceDefinition.functionName + '()')
|
||||
@@ -171,14 +172,22 @@ function newCanvas() {
|
||||
}
|
||||
|
||||
/* Set up Utilities of this Project */
|
||||
if (projectDefinition.utilities === undefined) {continue}
|
||||
if (projectDefinition.utilities === undefined) { continue }
|
||||
for (let j = 0; j < projectDefinition.utilities.length; j++) {
|
||||
let utilityDefinition = projectDefinition.utilities[j]
|
||||
|
||||
projectInstance.utilities[utilityDefinition.propertyName] = eval(utilityDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up Globals of this Project */
|
||||
if (projectDefinition.globals === undefined) { continue }
|
||||
for (let j = 0; j < projectDefinition.globals.length; j++) {
|
||||
let globalDefinition = projectDefinition.globals[j]
|
||||
|
||||
projectInstance.globals[globalDefinition.propertyName] = eval(globalDefinition.functionName + '()')
|
||||
}
|
||||
}
|
||||
console.log(UI)
|
||||
thisObject.animation.start()
|
||||
|
||||
} catch (err) {
|
||||
|
||||
+2
-4
@@ -33,17 +33,15 @@ const UI_FONT = {
|
||||
SECONDARY: "Source Code Pro"
|
||||
};
|
||||
|
||||
const DOCUMENTATION_URL_PREFIX = 'https://docs.superalgos.org/'
|
||||
const DOCUMENTATION_URL_DEFAULT = 'https://docs.superalgos.org/suite-about-this-documentation.html'
|
||||
|
||||
const MAC_AMOUNT_FACTOR = 5
|
||||
const IS_MAC = navigator.platform.toUpperCase().indexOf('MAC') >= 0
|
||||
|
||||
const DEBUG = {}
|
||||
|
||||
const DOUBLE_CLICK_ZOOM_OUT_LEVEL = 0
|
||||
const DOUBLE_CLICK_ZOOM_IN_LEVEL = 6
|
||||
const DOUBLE_CLICK_ZOOM_IN_IN_LEVEL = 7
|
||||
|
||||
const DEBUG = {}
|
||||
const ZOOM_OUT_THRESHOLD_FOR_NOT_HIDDING_PANELS = 12
|
||||
const ZOOM_OUT_THRESHOLD_FOR_HIDDING_PANELS = 7
|
||||
const ZOOM_OUT_THRESHOLD_FOR_HIDDING_CHARTS_LABELS = 7
|
||||
|
||||
Reference in new issue
Block a user