Intgrading the docs
This commit is contained in:
1 parent
3f66d48e7a
commit
6f474fd959
13 files changed
+546
-162
No files matched your search
@@ -88,6 +88,7 @@ function newAppLoader() {
|
||||
'Spaces/FloatingSpace.js',
|
||||
'Spaces/DesignSpace.js',
|
||||
'Spaces/SideSpace.js',
|
||||
'Spaces/DocSpace.js',
|
||||
|
||||
'Files/SingleFile.js',
|
||||
'Files/FileCloud.js',
|
||||
@@ -154,13 +155,9 @@ function newAppLoader() {
|
||||
modulesArray = modulesArray.concat(plotters)
|
||||
|
||||
let downloadedCounter = 0
|
||||
let versionParam = window.canvasApp.version
|
||||
if (versionParam === undefined) { versionParam = '' } else {
|
||||
versionParam = '?' + versionParam
|
||||
}
|
||||
|
||||
for (let i = 0; i < modulesArray.length; i++) {
|
||||
let path = window.canvasApp.urlPrefix + modulesArray[i] + versionParam
|
||||
let path = modulesArray[i]
|
||||
|
||||
REQUIREJS([path], onRequired)
|
||||
|
||||
|
||||
@@ -39,109 +39,83 @@ function loadSuperalgos() {
|
||||
|
||||
const MODULE_NAME = "App Pre-Loader";
|
||||
const INFO_LOG = false;
|
||||
const ERROR_LOG = true;
|
||||
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadSuperalgos -> Entering function."); }
|
||||
setupHTMLTextArea()
|
||||
setupHTMLInput()
|
||||
setupHTMLCanvas()
|
||||
loadDebugModule()
|
||||
|
||||
/* The first thing to do here is to add the canvas where all the action is going to happen. */
|
||||
function setupHTMLTextArea() {
|
||||
let textArea = document.createElement('textarea');
|
||||
textArea.id = "textArea";
|
||||
textArea.spellcheck = false;
|
||||
textArea.style = 'resize: none;' +
|
||||
' border: none;' +
|
||||
' outline: none;' +
|
||||
'box-shadow: none;' +
|
||||
'overflow:hidden;' +
|
||||
'font-family: ' + 'Saira' + ';' +
|
||||
'font-size: 12px;' +
|
||||
'background-color: rgb(255, 255, 255);' +
|
||||
'color:rgb(255, 255, 255);' +
|
||||
'width: ' + 600 + 'px;' +
|
||||
'height: ' + 400 + 'px'
|
||||
|
||||
let textAreaDiv = document.getElementById('textAreaDiv');
|
||||
textAreaDiv.appendChild(textArea);
|
||||
textAreaDiv.style = 'position:fixed; top:' + -1500 + 'px; left:' + 500 + 'px; z-index:10; '
|
||||
}
|
||||
|
||||
let textArea = document.createElement('textarea');
|
||||
textArea.id = "textArea";
|
||||
textArea.spellcheck = false;
|
||||
textArea.style = 'resize: none;' +
|
||||
' border: none;' +
|
||||
' outline: none;' +
|
||||
'box-shadow: none;' +
|
||||
'overflow:hidden;' +
|
||||
'font-family: ' + 'Saira' + ';' +
|
||||
'font-size: 12px;' +
|
||||
'background-color: rgb(255, 255, 255);' +
|
||||
'color:rgb(255, 255, 255);' +
|
||||
'width: ' + 600 + 'px;' +
|
||||
'height: ' + 400 + 'px'
|
||||
function setupHTMLInput() {
|
||||
let input = document.createElement('input');
|
||||
input.id = "input";
|
||||
input.spellcheck = false;
|
||||
input.style = "border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;";
|
||||
|
||||
let textAreaDiv = document.getElementById('textAreaDiv');
|
||||
textAreaDiv.appendChild(textArea);
|
||||
textAreaDiv.style = 'position:fixed; top:' + -1500 + 'px; left:' + 500 + 'px; z-index:10; '
|
||||
let inputDiv = document.getElementById('inputDiv');
|
||||
inputDiv.appendChild(input);
|
||||
}
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.id = "input";
|
||||
input.spellcheck = false;
|
||||
input.style = "border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;";
|
||||
function setupHTMLCanvas() {
|
||||
let canvas = document.createElement('canvas');
|
||||
|
||||
let inputDiv = document.getElementById('inputDiv');
|
||||
inputDiv.appendChild(input);
|
||||
canvas.id = "canvas";
|
||||
canvas.width = 1400;
|
||||
canvas.height = 600;
|
||||
canvas.style.border = "0";
|
||||
canvas.style = "position:absolute; top:0px; left:0px; z-index:1";
|
||||
|
||||
let canvasApp = document.getElementById('canvasApp');
|
||||
canvasApp.appendChild(canvas);
|
||||
|
||||
let canvas = document.createElement('canvas');
|
||||
browserCanvas = document.getElementById('canvas');
|
||||
|
||||
canvas.id = "canvas";
|
||||
canvas.width = 1400;
|
||||
canvas.height = 600;
|
||||
canvas.style.border = "0";
|
||||
canvas.style = "position:absolute; top:0px; left:0px; z-index:1";
|
||||
browserCanvas.width = window.innerWidth;
|
||||
browserCanvas.height = window.innerHeight;
|
||||
browserCanvas.style.border = "none";
|
||||
|
||||
let canvasApp = document.getElementById('canvasApp');
|
||||
canvasApp.appendChild(canvas);
|
||||
|
||||
browserCanvas = document.getElementById('canvas');
|
||||
|
||||
browserCanvas.width = window.innerWidth;
|
||||
browserCanvas.height = window.innerHeight - window.canvasApp.topMargin;
|
||||
browserCanvas.style.border = "none";
|
||||
|
||||
browserCanvas.style.top = window.canvasApp.topMargin + 'px';
|
||||
|
||||
|
||||
|
||||
loadDebugModule();
|
||||
browserCanvas.style.top = 0 + 'px';
|
||||
}
|
||||
|
||||
function loadDebugModule() {
|
||||
let path = "WebDebugLog.js";
|
||||
REQUIREJS([path], onRequired);
|
||||
|
||||
try {
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadDebugModule -> Entering function."); }
|
||||
|
||||
let path = window.canvasApp.urlPrefix + "WebDebugLog.js";
|
||||
|
||||
REQUIREJS([path], onRequired);
|
||||
|
||||
function onRequired(pModule) {
|
||||
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
|
||||
|
||||
loadModules();
|
||||
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log(spacePad(MODULE_NAME, 50) + " : " + "[ERROR] loadDebugModule --> " + path + " --> err = " + err.stack);
|
||||
function onRequired(pModule) {
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
|
||||
loadModules();
|
||||
}
|
||||
}
|
||||
|
||||
/* And Finally, we start loading all the scripts we will inmediatelly need. */
|
||||
|
||||
function loadModules() {
|
||||
let path = "WebServer/AppLoader.js";
|
||||
REQUIREJS([path], onRequired);
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadModules -> Entering function."); }
|
||||
|
||||
let path = window.canvasApp.urlPrefix + "WebServer/AppLoader.js";
|
||||
|
||||
REQUIREJS([path], onRequired);
|
||||
|
||||
function onRequired(pModule) {
|
||||
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
|
||||
|
||||
let APP_LOADER_MODULE = newAppLoader();
|
||||
APP_LOADER_MODULE.loadModules();
|
||||
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log(spacePad(MODULE_NAME, 50) + " : " + "[ERROR] loadModules --> " + path + " --> err = " + err.stack);
|
||||
function onRequired(pModule) {
|
||||
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
|
||||
let APP_LOADER_MODULE = newAppLoader();
|
||||
APP_LOADER_MODULE.loadModules();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadCanvas() {
|
||||
window.canvasApp = {
|
||||
urlPrefix: ''
|
||||
};
|
||||
|
||||
try {
|
||||
loadSuperalgos();
|
||||
} catch (err) {
|
||||
@@ -40,8 +36,10 @@
|
||||
onresize="onResize()">
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
<div id="docApp" style="position:fixed; top:100000px; left:100000px">
|
||||
<iframe id="docIFrame" src="https://docs.superalgos.org/" style="border:none; " height="2000" width="900"></iframe>
|
||||
</div>
|
||||
<div id="textAreaDiv"></div>
|
||||
<div id="inputDiv" style="font-family:saira condensed;"> </div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user