"Fixed Typos - Will add more in another PR"
This commit is contained in:
1 parent
04082339fc
commit
824843f70f
122 files changed
+395
-395
No files matched your search
@@ -34,7 +34,7 @@
|
||||
if (eventHandler === undefined) {
|
||||
/*
|
||||
We will only create event handlers which were not created before. Remember that someone trying to listen events
|
||||
at an event handler that does not exist, will create that eventhandler, so it is possible that the emitter
|
||||
at an event handler that does not exist, will create that event handler, so it is possible that the emitter
|
||||
when trying to create the event handler in fact was late and the event handler is already there if the listener
|
||||
arrived here first. An event handler created with this method is not destroyed if there are no listeners or they
|
||||
all leave.
|
||||
@@ -50,8 +50,8 @@
|
||||
let eventHandler = eventHandlers.get(command.eventHandlerName)
|
||||
if (eventHandler !== undefined) {
|
||||
/*
|
||||
We will only delete event handlers which have noone listening, allowing a listener to continue listening even
|
||||
when the event emitter is gone, asuming that it could come back at some point in time and resume emitting.
|
||||
We will only delete event handlers which have no one listening, allowing a listener to continue listening even
|
||||
when the event emitter is gone, assuming that it could come back at some point in time and resume emitting.
|
||||
*/
|
||||
if (eventHandler.listeners.length === 0) {
|
||||
eventHandlers.delete(command.eventHandlerName)
|
||||
@@ -68,8 +68,8 @@
|
||||
if (eventHandler === undefined) {
|
||||
/*
|
||||
We will create event handlers which were not created before if a listener tries to listen to a handler that does not
|
||||
exist before the emitter comes and create it. This is to aviod syncronization problems and also problems with emitters life
|
||||
cycles with higher frecuency that the ones of listeners. Created in this way, event handlers are marked for deletion if
|
||||
exist before the emitter comes and create it. This is to avoid synchronization problems and also problems with emitters life
|
||||
cycles with higher frequency that the ones of listeners. Created in this way, event handlers are marked for deletion if
|
||||
all listeners stop listening at one point in time.
|
||||
*/
|
||||
eventHandler = newEventHandler()
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
if (eventHandler === undefined) {
|
||||
|
||||
/* If the event handler does not exist anymore, then there is no need to perform further actiions. */
|
||||
/* If the event handler does not exist anymore, then there is no need to perform further actions. */
|
||||
sendResponse(global.DEFAULT_OK_RESPONSE)
|
||||
return
|
||||
}
|
||||
@@ -112,7 +112,7 @@
|
||||
eventHandler.stopListening(command.eventHandlerName, command.eventType, command.callerId, command.eventSubscriptionId)
|
||||
|
||||
/*
|
||||
We check here if there are no more listeners and the event handler original emmiter is also gone, then we need to delete
|
||||
We check here if there are no more listeners and the event handler original emitter is also gone, then we need to delete
|
||||
this event handlers since chances are that is not needed anymore.
|
||||
*/
|
||||
if (eventHandler.listeners.length === 0 && eventHandler.deleteWhenAllListenersAreGone === true) {
|
||||
@@ -130,7 +130,7 @@
|
||||
eventHandler = newEventHandler()
|
||||
eventHandlers.set(command.eventHandlerName, eventHandler)
|
||||
|
||||
/* No matter if it is the listener or the emiter the one that acts first, if an event handler does not exist we just create it acan keep it there. */
|
||||
/* No matter if it is the listener or the emitter the one that acts first, if an event handler does not exist we just create it and keep it there. */
|
||||
|
||||
}
|
||||
//console.log("[INFO] Client -> Events Server -> Raising Event " + command.eventHandlerName + " " + command.eventType)
|
||||
@@ -163,7 +163,7 @@
|
||||
let thisObject = {
|
||||
name: undefined, // This is for debugging purposes only.
|
||||
deleteWhenAllListenersAreGone: false,
|
||||
listeners: [], // Here we store all the functions we will call when an event is raiseed.
|
||||
listeners: [], // Here we store all the functions we will call when an event is raised.
|
||||
listenToEvent: listenToEvent,
|
||||
stopListening: stopListening,
|
||||
raiseEvent: raiseEvent,
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
/*
|
||||
We can not allow to have the exact same listener more than once. In case that we find a listener trying to listen again, the first record will
|
||||
be deleted and we are just going to consider the last one comming in.
|
||||
be deleted and we are just going to consider the last one coming in.
|
||||
*/
|
||||
for (let i = 0; i < thisObject.listeners.length; i++) {
|
||||
if (eventHandlerName === thisObject.listeners[i][0] && eventType === thisObject.listeners[i][1] && callerId === thisObject.listeners[i][2]) {
|
||||
|
||||
@@ -316,7 +316,7 @@ exports.newGithubServer = function newGithubServer() {
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pullRequest.number,
|
||||
body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.'
|
||||
body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothing else but that file. All validations were successful.'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -723,7 +723,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
console.log('[ERROR] httpInterface -> App -> Contribute -> doGit -> currentBranch = ' + currentBranch)
|
||||
console.log('[ERROR] httpInterface -> App -> Contribute -> doGit -> contributionsBranch = ' + contributionsBranch)
|
||||
console.log('')
|
||||
console.log('Torubleshooting Tips:')
|
||||
console.log('Troubleshooting Tips:')
|
||||
console.log('')
|
||||
console.log('1. Make sure that you have set up your Github Username and Token at the APIs -> Github API node at the workspace.')
|
||||
console.log('2. Make sure you are running the latest version of Git available for your OS.')
|
||||
|
||||
@@ -149,12 +149,12 @@ function newAnimation() {
|
||||
}
|
||||
}
|
||||
|
||||
/* We request the next frame to be drawn, and stablishing a loop */
|
||||
/* We request the next frame to be drawn, and establish a loop */
|
||||
|
||||
/* Use this code for full animation speed. */
|
||||
animationLoopHandle = window.requestAnimationFrame(animationLoop)
|
||||
|
||||
/* Use this code for max 10 frames per second animation speed, if the app is consumming too much of your CPU. */
|
||||
/* Use this code for max 10 frames per second animation speed, if the app is consuming too much of your CPU. */
|
||||
/*
|
||||
setTimeout(nextLoop, 100)
|
||||
function nextLoop () {
|
||||
|
||||
@@ -47,7 +47,7 @@ function loadSuperalgos() {
|
||||
loadDebugModule()
|
||||
|
||||
if ((browser.name !== "Chrome" && browser.name!=="Safari") || (browser.name === "Chrome" && parseInt(browser.version) < 85) || (browser.name === "Safari" && parseInt(browser.version) < 13)) {
|
||||
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionaility issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
|
||||
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionality issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
|
||||
}
|
||||
|
||||
function checkBrowserVersion () {
|
||||
@@ -131,7 +131,7 @@ function loadSuperalgos() {
|
||||
}
|
||||
}
|
||||
|
||||
/* And Finally, we start loading all the scripts we will inmediatelly need. */
|
||||
/* And Finally, we start loading all the scripts we will immediately need. */
|
||||
function loadModules() {
|
||||
let path = "AppLoader.js"
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
+12
-12
@@ -172,7 +172,7 @@ function newCanvas() {
|
||||
spaceDefinitionDrawMap.set(spaceDefinition.animationDrawIndex, spaceDefinition)
|
||||
}
|
||||
|
||||
/* Build the maps that defines the secuence of execution of different events. */
|
||||
/* Build the maps that defines the sequence of execution of different events. */
|
||||
if (spaceDefinition.onMouseWheelIndex !== undefined) {
|
||||
projectInstance.events.onMouseWheelMap.set(spaceDefinition.onMouseWheelIndex, spaceInstance)
|
||||
}
|
||||
@@ -373,7 +373,7 @@ function newCanvas() {
|
||||
|
||||
if (EDITOR_ON_FOCUS === true) {
|
||||
/*
|
||||
We will fordward the event to whoever is
|
||||
We will forward the event to whoever is
|
||||
controlling the editor.
|
||||
*/
|
||||
if (window.editorController !== undefined) {
|
||||
@@ -650,7 +650,7 @@ function newCanvas() {
|
||||
if ((event.ctrlKey === true || event.metaKey === true) && event.altKey === true) {
|
||||
/* Shortcuts to nodes */
|
||||
if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 65 && event.keyCode <= 90)) {
|
||||
/* From here we prevent the default behaviour. Putting it earlier prevents imput box and text area to receive keystrokes */
|
||||
/* From here we prevent the default behaviour. Putting it earlier prevents input box and text area to receive keystrokes */
|
||||
event.preventDefault()
|
||||
let nodeUsingThisKey = await UI.projects.foundations.spaces.designSpace.workspace.getNodeByShortcutKey(event.key)
|
||||
|
||||
@@ -771,11 +771,11 @@ function newCanvas() {
|
||||
/*
|
||||
We will go through all the spaces defined at the project schema for each project
|
||||
and we are going to query each space to see if they have the container that is at
|
||||
the mouse position. We will order firt the spaces by the sequence order defined
|
||||
the mouse position. We will order first the spaces by the sequence order defined
|
||||
at the project schema specifically for this mouse event.
|
||||
|
||||
The order of the projects for events evaluations has intentionally been inverted,
|
||||
because the latest project is drwan the last, on top of the others, that means that
|
||||
because the latest project is drawn the last, on top of the others, that means that
|
||||
events should belong to the last first.
|
||||
*/
|
||||
for (let i = PROJECTS_SCHEMA.length - 1; i >= 0; i--) {
|
||||
@@ -881,11 +881,11 @@ function newCanvas() {
|
||||
/*
|
||||
We will go through all the spaces defined at the project schema for each project
|
||||
and we are going to query each space to see if they have the container that is at
|
||||
the mouse position. We will order firt the spaces by the sequence order defined
|
||||
the mouse position. We will order first the spaces by the sequence order defined
|
||||
at the project schema specifically for this mouse event.
|
||||
|
||||
The order of the projects for events evaluations has intentionally been inverted,
|
||||
because the latest project is drwan the last, on top of the others, that means that
|
||||
because the latest project is drawn the last, on top of the others, that means that
|
||||
events should belong to the last first.
|
||||
*/
|
||||
for (let i = PROJECTS_SCHEMA.length - 1; i >= 0; i--) {
|
||||
@@ -992,18 +992,18 @@ function newCanvas() {
|
||||
return
|
||||
}
|
||||
|
||||
/* Then we check who is the current object underneeth the mounse. */
|
||||
/* Then we check who is the current object underneath the mouse. */
|
||||
|
||||
let container
|
||||
|
||||
/*
|
||||
We will go through all the spaces defined at the project schema for each project
|
||||
and we are going to query each space to see if they have the container that is at
|
||||
the mouse position. We will order firt the spaces by the sequence order defined
|
||||
the mouse position. We will order first the spaces by the sequence order defined
|
||||
at the project schema specifically for this mouse event.
|
||||
|
||||
The order of the projects for events evaluations has intentionally been inverted,
|
||||
because the latest project is drwan the last, on top of the others, that means that
|
||||
because the latest project is drawn the last, on top of the others, that means that
|
||||
events should belong to the last first.
|
||||
*/
|
||||
for (let i = PROJECTS_SCHEMA.length - 1; i >= 0; i--) {
|
||||
@@ -1063,11 +1063,11 @@ function newCanvas() {
|
||||
/*
|
||||
We will go through all the spaces defined at the project schema for each project
|
||||
and we are going to query each space to see if they have the container that is at
|
||||
the mouse position. We will order firt the spaces by the sequence order defined
|
||||
the mouse position. We will order first the spaces by the sequence order defined
|
||||
at the project schema specifically for this mouse event.
|
||||
|
||||
The order of the projects for events evaluations has intentionally been inverted,
|
||||
because the latest project is drwan the last, on top of the others, that means that
|
||||
because the latest project is drawn the last, on top of the others, that means that
|
||||
events should belong to the last first.
|
||||
*/
|
||||
for (let i = PROJECTS_SCHEMA.length - 1; i >= 0; i--) {
|
||||
|
||||
@@ -77,7 +77,7 @@ function newFileCloud () {
|
||||
}
|
||||
|
||||
if (fileName === undefined) {
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> Inconsistant data. Check the following: ')
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> Inconsistent data. Check the following: ')
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> pMine = ' + JSON.stringify(pMine))
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> pBot = ' + JSON.stringify(pBot))
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> pDataset = ' + JSON.stringify(pDataset))
|
||||
@@ -85,7 +85,7 @@ function newFileCloud () {
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> pMarket = ' + JSON.stringify(pMarket))
|
||||
logger.write('[ERROR] getFile -> getFileRecursively -> ptimeFrameLabel = ' + JSON.stringify(ptimeFrameLabel))
|
||||
|
||||
throw ('Inconsistant data received.')
|
||||
throw ('Inconsistent data received.')
|
||||
}
|
||||
|
||||
if (pMarket !== undefined) {
|
||||
@@ -152,7 +152,7 @@ function newFileCloud () {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> filePath = ' + filePath) }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> fileName = ' + fileName) }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> Unexpected Error Ocurred.') }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> Unexpected Error Occurred.') }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> err = ' + err.stack) }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> text = ' + text) }
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] getFile -> getFileRecursively -> onFileReceived -> response = ' + response) }
|
||||
|
||||
@@ -195,7 +195,7 @@ function newFileCursor() {
|
||||
/*
|
||||
|
||||
We are implementing here an algorithm designed to save bandwidth, memory and processing power at the browser.
|
||||
We say there is a saving mode where the cursor is running at a minimum size. When the end user aproaches the time period the cursor
|
||||
We say there is a saving mode where the cursor is running at a minimum size. When the end user approaches the time period the cursor
|
||||
is set, then it should exit the saving mode and go to its actual size.
|
||||
|
||||
To do this we are going to measure the distance from the Time Frame received to the one the cursors was initialized with.
|
||||
@@ -427,7 +427,7 @@ function newFileCursor() {
|
||||
let targetDate = new Date(cursorDate)
|
||||
targetDate.setUTCDate(targetDate.getUTCDate() + j)
|
||||
|
||||
/* Small algorith to allow load first the current date, then alternate between the most forwad and the most backwards ones. */
|
||||
/* Small algorithm to allow load first the current date, then alternate between the most forward and the most backwards ones. */
|
||||
if (j === 0) { j++ } else {
|
||||
if (j < 0) {
|
||||
j = -j
|
||||
|
||||
@@ -45,7 +45,7 @@ function newFileStorage(host, port, scheme='http') {
|
||||
url = folder + filePath
|
||||
}
|
||||
|
||||
/* Scaping # since it breaks the URL */
|
||||
/* Escaping # since it breaks the URL */
|
||||
url = url.replaceAll('#', '_HASHTAG_')
|
||||
|
||||
httpRequest(undefined, url, (response, fileContent) => {
|
||||
@@ -64,7 +64,7 @@ function newFileStorage(host, port, scheme='http') {
|
||||
let err = { code: 'The specified key does not exist.' }
|
||||
callBackFunction(err)
|
||||
} else {
|
||||
console.log('Error geting the file from the serever:', err)
|
||||
console.log('Error getting the file from the server:', err)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ function newEventHandler() {
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let eventHandlers = [] // Here we store all the functions we will call when an event is raiseed.
|
||||
let eventHandlers = [] // Here we store all the functions we will call when an event is raised.
|
||||
|
||||
return thisObject
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ function newEventsServerClient(lanNetworkNode) {
|
||||
port = config.webSocketsPort
|
||||
extwsurl = config.webSocketsExternalURL
|
||||
|
||||
/* Check if we really have to stablish the connection. */
|
||||
/* Check if we really have to establish the connection. */
|
||||
if (config.autoConnect === false) { return }
|
||||
} catch (err) {
|
||||
lanNetworkNode.payload.uiObject.setErrorMessage(
|
||||
@@ -285,7 +285,7 @@ function newEventsServerClient(lanNetworkNode) {
|
||||
}
|
||||
}
|
||||
WEB_SOCKETS_CONNECTION.onmessage = e => {
|
||||
// console.log('Websoked Message Received: ' + e.data)
|
||||
// console.log('WEB_SOCKET Message Received: ' + e.data)
|
||||
|
||||
let message = JSON.parse(e.data)
|
||||
|
||||
|
||||
Reference in new issue
Block a user