Refactoring window.TOP_MARGIN -> window.canvasApp.topMargin
This commit is contained in:
1 parent
d718bfda01
commit
430d87070a
4 files changed
+12
-12
No files matched your search
+1
-1
@@ -120,7 +120,7 @@ function newAnimation() {
|
||||
/* We set the canvas to its normal width and height */
|
||||
|
||||
browserCanvas.width = window.innerWidth;
|
||||
browserCanvas.height = window.innerHeight - window.TOP_MARGIN;
|
||||
browserCanvas.height = window.innerHeight - window.canvasApp.topMargin;
|
||||
|
||||
/* We loop through the callback functions collections and execute them all. */
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
dragVector.downX = point.x;
|
||||
@@ -367,7 +367,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
let container;
|
||||
@@ -469,7 +469,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
viewPort.mousePosition.x = point.x;
|
||||
@@ -522,7 +522,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
let container;
|
||||
@@ -601,7 +601,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
let panelContainer = canvas.panelsSpace.getContainer({ x: point.x, y: point.y });
|
||||
@@ -667,7 +667,7 @@ function newCanvas() {
|
||||
|
||||
let point = {
|
||||
x: event.pageX,
|
||||
y: event.pageY - window.TOP_MARGIN
|
||||
y: event.pageY - window.canvasApp.topMargin
|
||||
};
|
||||
|
||||
browserCanvas.style.cursor = "grabbing";
|
||||
|
||||
@@ -59,10 +59,10 @@ function loadAdvancedAlgosPlatform() {
|
||||
browserCanvas = document.getElementById('canvas');
|
||||
|
||||
browserCanvas.width = window.innerWidth;
|
||||
browserCanvas.height = window.innerHeight - window.TOP_MARGIN;
|
||||
browserCanvas.height = window.innerHeight - window.canvasApp.topMargin;
|
||||
browserCanvas.style.border = "none";
|
||||
|
||||
browserCanvas.style.top = window.TOP_MARGIN + 'px';
|
||||
browserCanvas.style.top = window.canvasApp.topMargin + 'px';
|
||||
|
||||
/* The second thing to do is to send the tokenSession to the server, so that it can prepare the server side data structures needed. */
|
||||
|
||||
|
||||
+3
-3
@@ -14,15 +14,15 @@
|
||||
|
||||
window.canvasApp = {
|
||||
sessionToken: '',
|
||||
executingAt: 'Master App',
|
||||
executingAt: 'Master App',
|
||||
visible = true,
|
||||
topMargin: 85,
|
||||
urlPrefix: 'https://develop.advancedalgos.net/' /* 'http://localhost:1337/' */
|
||||
}
|
||||
};
|
||||
|
||||
window.canvasApp.sessionToken = '';
|
||||
window.canvasApp.executingAt = 'Master App';
|
||||
window.TOP_MARGIN = 85;
|
||||
window.canvasApp.topMargin = 85;
|
||||
window.CANVAS_VISIBLE = true;
|
||||
window.URL_PREFIX = 'https://develop.advancedalgos.net/';
|
||||
//window.URL_PREFIX = 'http://localhost:1337/';
|
||||
|
||||
Reference in new issue
Block a user