HUGE Refactoring Superalgos Project to Foundations Project done

This commit is contained in:
Luis Fernando Molina committed 2021-06-09 22:21:01 +02:00
1 parent c9c0aeaca7
commit 87edcc043d
3557 files changed
+10791 -10789

No files matched your search

+8 -8
View File
@@ -116,23 +116,23 @@ function newAnimation() {
for (const [key, timeConsumed] of performanceMap.entries()) {
row++
let labelToPrint = key + ' ' + timeConsumed.toFixed(4)
UI.projects.superalgos.utilities.drawPrint.printLabel(labelToPrint, 10,undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(labelToPrint, 10,undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
let percentage = timeConsumed * 100 / totalTimeConsumed
labelToPrint = key + ' ' + percentage.toFixed(1) + '%'
UI.projects.superalgos.utilities.drawPrint.printLabel(labelToPrint, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(labelToPrint, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
}
/* Other Variables */
row++
UI.projects.superalgos.utilities.drawPrint.printLabel(DEBUG.variable1, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(DEBUG.variable1, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
row++
UI.projects.superalgos.utilities.drawPrint.printLabel(DEBUG.variable2, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(DEBUG.variable2, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
row++
UI.projects.superalgos.utilities.drawPrint.printLabel(DEBUG.variable3, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(DEBUG.variable3, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
row++
UI.projects.superalgos.utilities.drawPrint.printLabel(DEBUG.variable4, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel(DEBUG.variable4, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
row++
UI.projects.superalgos.utilities.drawPrint.printLabel('Animation Frame Per Seconds: ' + ANIMATION_FRAME_PER_SECONDS, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
UI.projects.foundations.utilities.drawPrint.printLabel('Animation Frame Per Seconds: ' + ANIMATION_FRAME_PER_SECONDS, 300, undefined, undefined, 100 + row * 30, 1, 20, UI_COLOR.RED, 'Left')
}
/* Video Recording */
@@ -144,7 +144,7 @@ function newAnimation() {
/* Panorama Recording */
if (ARE_WE_RECORDING_A_MARKET_PANORAMA === true) {
if (PANORAMA_WAS_PANNED === true) {
UI.projects.superalgos.utilities.download.addToMarketPanorama()
UI.projects.foundations.utilities.download.addToMarketPanorama()
PANORAMA_WAS_PANNED = false
}
}
+7 -7
View File
@@ -177,13 +177,13 @@ function newAppLoader() {
function defaultPlotters() {
return [
'Plotters/Superalgos/Candles/Plotters-Candles-Volumes/Candles.js',
'Plotters/Superalgos/Candles/Plotters-Candles-Volumes/CandlePanel.js',
'Plotters/Superalgos/Candles/Plotters-Candles-Volumes/Volumes.js',
'Plotters/Superalgos/Candles/Plotters-Candles-Volumes/VolumePanel.js',
'Plotters/Superalgos/Bollinger/Plotters-Bollinger-Bands/BollingerBands.js',
'Plotters/Superalgos/Bollinger/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
'Plotters/Superalgos/Bollinger/Plotters-Bollinger-Bands/PercentageBandwidth.js'
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Candles.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/CandlePanel.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Volumes.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/VolumePanel.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBands.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/PercentageBandwidth.js'
]
}
}
+1 -1
View File
@@ -229,7 +229,7 @@ function newAppPostLoader() {
window.addEventListener('keydown', window.manageBackRefresh)
function saveWorkspace() {
UI.projects.superalgos.spaces.designSpace.workspace.save()
UI.projects.foundations.spaces.designSpace.workspace.save()
}
}
}
+37 -37
View File
@@ -53,9 +53,9 @@ function newCanvas() {
UI.projects.education.spaces.tutorialSpace.finalize()
UI.projects.education.spaces.docsSpace.finalize()
//thisObject.chatSpace.finalize()
UI.projects.superalgos.spaces.sideSpace.finalize()
UI.projects.superalgos.spaces.chartingSpace.finalize()
UI.projects.superalgos.spaces.floatingSpace.finalize()
UI.projects.foundations.spaces.sideSpace.finalize()
UI.projects.foundations.spaces.chartingSpace.finalize()
UI.projects.foundations.spaces.floatingSpace.finalize()
thisObject.shorcutNumbers = undefined
if (browserCanvas.removeEventListener) {
@@ -318,12 +318,12 @@ function newCanvas() {
break
}
case 118: { // F7
UI.projects.superalgos.utilities.download.downloadPanorama('Superalgos.Market.Panorama')
UI.projects.foundations.utilities.download.downloadPanorama('Superalgos.Market.Panorama')
return
break
}
case 119: { // F8
UI.projects.superalgos.utilities.download.downloadCanvas('Superalgos.Image.Capture', browserCanvas)
UI.projects.foundations.utilities.download.downloadCanvas('Superalgos.Image.Capture', browserCanvas)
return
break
}
@@ -367,7 +367,7 @@ function newCanvas() {
}
async function onKeyDown(event) {
if (UI.projects.superalgos.spaces.designSpace.workspace === undefined) { return }
if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return }
if (EDITOR_ON_FOCUS === true) {
/*
@@ -391,7 +391,7 @@ function newCanvas() {
event.x = thisObject.mouse.position.x
event.y = thisObject.mouse.position.y
UI.projects.superalgos.spaces.chartingSpace.onKeyPressed(event)
UI.projects.foundations.spaces.chartingSpace.onKeyPressed(event)
/* Shourcuts to Menu Items */
if ((event.keyCode >= 48 && event.keyCode <= 57)) {
@@ -411,37 +411,37 @@ function newCanvas() {
}
}
if (event.key === 'Escape' && UI.projects.superalgos.spaces.floatingSpace.inMapMode === true) {
UI.projects.superalgos.spaces.floatingSpace.exitMapMode()
if (event.key === 'Escape' && UI.projects.foundations.spaces.floatingSpace.inMapMode === true) {
UI.projects.foundations.spaces.floatingSpace.exitMapMode()
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'M' || event.key === 'm')) {
UI.projects.superalgos.spaces.floatingSpace.toggleMapMode()
UI.projects.foundations.spaces.floatingSpace.toggleMapMode()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'R' || event.key === 'r')) {
UI.projects.superalgos.spaces.floatingSpace.toggleDrawReferenceLines()
UI.projects.foundations.spaces.floatingSpace.toggleDrawReferenceLines()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'C' || event.key === 'c')) {
UI.projects.superalgos.spaces.floatingSpace.toggleDrawChainLines()
UI.projects.foundations.spaces.floatingSpace.toggleDrawChainLines()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'S' || event.key === 's')) {
UI.projects.superalgos.spaces.designSpace.workspace.save()
UI.projects.foundations.spaces.designSpace.workspace.save()
if (event.preventDefault !== undefined) {
event.preventDefault()
}
return
}
let nodeOnFocus = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeThatIsOnFocus()
let nodeOnFocus = await UI.projects.foundations.spaces.designSpace.workspace.getNodeThatIsOnFocus()
if (nodeOnFocus !== undefined) {
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
if (nodeOnFocus.payload.uiObject.codeEditor.visible === true) {
@@ -492,55 +492,55 @@ function newCanvas() {
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') {
UI.projects.superalgos.spaces.cockpitSpace.toTop()
UI.projects.foundations.spaces.cockpitSpace.toTop()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') {
UI.projects.superalgos.spaces.cockpitSpace.toBottom()
UI.projects.foundations.spaces.cockpitSpace.toBottom()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowLeft') {
UI.projects.superalgos.spaces.cockpitSpace.moveUp()
UI.projects.foundations.spaces.cockpitSpace.moveUp()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowRight') {
UI.projects.superalgos.spaces.cockpitSpace.moveDown()
UI.projects.foundations.spaces.cockpitSpace.moveDown()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === false && event.metaKey === false) && event.code === 'ArrowLeft') {
UI.projects.superalgos.spaces.chartingSpace.oneScreenLeft()
UI.projects.foundations.spaces.chartingSpace.oneScreenLeft()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === false && event.metaKey === false) && event.code === 'ArrowRight') {
UI.projects.superalgos.spaces.chartingSpace.oneScreenRight()
UI.projects.foundations.spaces.chartingSpace.oneScreenRight()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === false && event.metaKey === false) && event.code === 'ArrowUp') {
UI.projects.superalgos.spaces.chartingSpace.oneScreenUp()
UI.projects.foundations.spaces.chartingSpace.oneScreenUp()
event.preventDefault()
return
}
if (event.shiftKey === true && (event.ctrlKey === false && event.metaKey === false) && event.code === 'ArrowDown') {
UI.projects.superalgos.spaces.chartingSpace.oneScreenDown()
UI.projects.foundations.spaces.chartingSpace.oneScreenDown()
event.preventDefault()
return
}
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowLeft') {
let displaceVector = UI.projects.superalgos.spaces.floatingSpace.oneScreenLeft()
let displaceVector = UI.projects.foundations.spaces.floatingSpace.oneScreenLeft()
if (displaceVector !== undefined) {
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
@@ -551,7 +551,7 @@ function newCanvas() {
}
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowRight') {
let displaceVector = UI.projects.superalgos.spaces.floatingSpace.oneScreenRight()
let displaceVector = UI.projects.foundations.spaces.floatingSpace.oneScreenRight()
if (displaceVector !== undefined) {
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
@@ -562,7 +562,7 @@ function newCanvas() {
}
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowUp') {
let displaceVector = UI.projects.superalgos.spaces.floatingSpace.oneScreenUp()
let displaceVector = UI.projects.foundations.spaces.floatingSpace.oneScreenUp()
if (displaceVector !== undefined) {
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
@@ -573,7 +573,7 @@ function newCanvas() {
}
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowDown') {
let displaceVector = UI.projects.superalgos.spaces.floatingSpace.oneScreenDown()
let displaceVector = UI.projects.foundations.spaces.floatingSpace.oneScreenDown()
if (displaceVector !== undefined) {
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
@@ -595,7 +595,7 @@ function newCanvas() {
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 */
event.preventDefault()
let nodeUsingThisKey = await UI.projects.superalgos.spaces.designSpace.workspace.getNodeByShortcutKey(event.key)
let nodeUsingThisKey = await UI.projects.foundations.spaces.designSpace.workspace.getNodeByShortcutKey(event.key)
if (nodeUsingThisKey !== undefined) {
if (nodeOnFocus !== undefined) {
@@ -611,7 +611,7 @@ function newCanvas() {
nodeOnFocus.payload.uiObject.setValue('Shortcut Key: Ctrl + Alt + ' + event.key)
}
} else {
UI.projects.superalgos.spaces.floatingSpace.positionAtNode(nodeUsingThisKey)
UI.projects.foundations.spaces.floatingSpace.positionAtNode(nodeUsingThisKey)
}
return
} else {
@@ -635,7 +635,7 @@ function newCanvas() {
try {
event.preventDefault()
event.stopPropagation()
UI.projects.superalgos.spaces.cockpitSpace.toTop()
UI.projects.foundations.spaces.cockpitSpace.toTop()
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] onDragEnter -> err = ' + err.stack) }
}
@@ -679,7 +679,7 @@ function newCanvas() {
x: event.x,
y: event.y
}
UI.projects.superalgos.spaces.designSpace.workspace.spawn(reader.result, mousePosition)
UI.projects.foundations.spaces.designSpace.workspace.spawn(reader.result, mousePosition)
}
}
} catch (err) {
@@ -880,14 +880,14 @@ function newCanvas() {
point.x = event.pageX
point.y = event.pageY - CURRENT_TOP_MARGIN
if (UI.projects.superalgos.spaces.chartingSpace.viewport !== undefined) {
UI.projects.superalgos.spaces.chartingSpace.viewport.mousePosition.x = point.x
UI.projects.superalgos.spaces.chartingSpace.viewport.mousePosition.y = point.y
if (UI.projects.foundations.spaces.chartingSpace.viewport !== undefined) {
UI.projects.foundations.spaces.chartingSpace.viewport.mousePosition.x = point.x
UI.projects.foundations.spaces.chartingSpace.viewport.mousePosition.y = point.y
}
if (containerDragStarted === true || floatingObjectDragStarted === true || viewPortBeingDragged === true) {
if (floatingObjectDragStarted === true) {
let targetContainer = UI.projects.superalgos.spaces.floatingSpace.getContainer(point)
let targetContainer = UI.projects.foundations.spaces.floatingSpace.getContainer(point)
if (targetContainer !== undefined) {
if (targetContainer.id !== containerBeingDragged.id) {
containerBeingDragged.eventHandler.raiseEvent('onDragFinished', point)
@@ -1081,7 +1081,7 @@ function newCanvas() {
y: dragVector.upY - dragVector.downY
}
UI.projects.superalgos.spaces.chartingSpace.viewport.displace(displaceVector)
UI.projects.foundations.spaces.chartingSpace.viewport.displace(displaceVector)
}
if (containerDragStarted) {
if (containerBeingDragged !== undefined) {
@@ -1092,7 +1092,7 @@ function newCanvas() {
}
let downNoZoom
downNoZoom = UI.projects.superalgos.spaces.chartingSpace.viewport.unTransformThisPoint(downCopy)
downNoZoom = UI.projects.foundations.spaces.chartingSpace.viewport.unTransformThisPoint(downCopy)
let upCopy = {
x: dragVector.upX,
@@ -1100,7 +1100,7 @@ function newCanvas() {
}
let upNoZoom
upNoZoom = UI.projects.superalgos.spaces.chartingSpace.viewport.unTransformThisPoint(upCopy)
upNoZoom = UI.projects.foundations.spaces.chartingSpace.viewport.unTransformThisPoint(upCopy)
displaceVector = {
x: upNoZoom.x - downNoZoom.x,
+3 -3
View File
@@ -231,7 +231,7 @@ function newEventsServerClient(networkNode) {
'Bad configuration. Invalid JSON Format.',
undefined,
{
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'UI Websockets Error - Bad Configuration',
anchor: 'Invalid JSON Format'
@@ -245,7 +245,7 @@ function newEventsServerClient(networkNode) {
'Bad configuration. Host Property Not Found.',
undefined,
{
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'UI Websockets Error - Bad Configuration',
anchor: 'Host Property Not Found'
@@ -259,7 +259,7 @@ function newEventsServerClient(networkNode) {
'Bad configuration. WebSocketsPort Property Not Found.',
undefined,
{
project: 'Superalgos',
project: 'Foundations',
category: 'Topic',
type: 'UI Websockets Error - Bad Configuration',
anchor: 'WebSocketsPort Property Not Found'
+22 -22
View File
@@ -53,7 +53,7 @@ function newFrame() {
}
function isInViewPort() {
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.superalgos.spaces.chartingSpace.viewport */
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
point1 = {
x: 0,
@@ -67,10 +67,10 @@ function newFrame() {
/* Now the transformations. */
point1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
if (point1.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x && point1.y < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y && point3.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x && point3.y > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y) {
if (point1.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x && point1.y < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y && point3.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x && point3.y > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y) {
return true
} else {
return false
@@ -78,7 +78,7 @@ function newFrame() {
}
function isCenterInViewPort() {
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.superalgos.spaces.chartingSpace.viewport */
/* This function is usefull to know if the object who has this frame is currently appearing at least in part at the UI.projects.foundations.spaces.chartingSpace.viewport */
point1 = {
x: thisObject.width * 40 / 100,
@@ -92,10 +92,10 @@ function newFrame() {
/* Now the transformations. */
point1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
if (point1.x < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topRight.x && point1.y < UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomRight.y && point3.x > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x && point3.y > UI.projects.superalgos.spaces.chartingSpace.viewport.visibleArea.topLeft.y) {
if (point1.x < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topRight.x && point1.y < UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomRight.y && point3.x > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.bottomLeft.x && point3.y > UI.projects.foundations.spaces.chartingSpace.viewport.visibleArea.topLeft.y) {
return true
} else {
return false
@@ -204,7 +204,7 @@ function newFrame() {
if (outsideViewPort === true) {
checkPoint = thisObject.container.frame.unframeThisPoint(checkPoint)
} else {
checkPoint = UI.projects.superalgos.utilities.coordinateTransformations.unTransformThisPoint(checkPoint, thisObject.container)
checkPoint = UI.projects.foundations.utilities.coordinateTransformations.unTransformThisPoint(checkPoint, thisObject.container)
}
}
@@ -290,7 +290,7 @@ function newFrame() {
fitFunction: fitFunction
}
UI.projects.superalgos.utilities.drawPrint.roundedCornersBackground(params)
UI.projects.foundations.utilities.drawPrint.roundedCornersBackground(params)
titleBarPoint1 = {
x: 0,
@@ -388,10 +388,10 @@ function newFrame() {
}
/* Now the transformations. */
point1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
point3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
point1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
point3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
if (fitFunction !== undefined) {
point1 = fitFunction(point1)
@@ -437,8 +437,8 @@ function newFrame() {
y: j
}
point1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
point1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
if (fitFunction !== undefined) {
point1 = fitFunction(point1)
@@ -459,8 +459,8 @@ function newFrame() {
y: thisObject.height
}
point3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
point3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
if (fitFunction !== undefined) {
point3 = fitFunction(point3)
@@ -495,8 +495,8 @@ function newFrame() {
y: j
}
point1 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
point1 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point1, thisObject.container)
point2 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point2, thisObject.container)
if (fitFunction !== undefined) {
point1 = fitFunction(point1)
@@ -517,8 +517,8 @@ function newFrame() {
y: thisObject.height
}
point3 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
point3 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point3, thisObject.container)
point4 = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(point4, thisObject.container)
if (fitFunction !== undefined) {
point3 = fitFunction(point3)
+2 -2
View File
@@ -203,9 +203,9 @@ const _1_MINUTE_IN_MILISECONDS = 1 * 60 * 1000;
let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at the UI.projects.superalgos.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
let INITIAL_ZOOM_LEVEL = -28.25 // This is the zoom level at the view port in which the APP starts.
let INITIAL_TIME_PERIOD = ONE_DAY_IN_MILISECONDS // This value will be overwritten at the UI.projects.superalgos.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
let INITIAL_TIME_PERIOD = ONE_DAY_IN_MILISECONDS // This value will be overwritten at the UI.projects.foundations.spaces.chartingSpace.viewport.initialize if the user had a prevous session with this same browser.
let VERY_LARGE_NUMBER = 100000000000000
const TOP_MARGIN = 0
+4 -4
View File
@@ -71,14 +71,14 @@ function moveToUserPosition(container, currentDate, currentRate, coordinateSyste
y: currentRate
}
/* Put this point in the coordinate system of the UI.projects.superalgos.spaces.chartingSpace.viewport */
/* Put this point in the coordinate system of the UI.projects.foundations.spaces.chartingSpace.viewport */
targetPoint = coordinateSystem.transformThisPoint(targetPoint)
targetPoint = UI.projects.superalgos.utilities.coordinateTransformations.transformThisPoint(targetPoint, container)
targetPoint = UI.projects.foundations.utilities.coordinateTransformations.transformThisPoint(targetPoint, container)
let displaceVector
let targetNoZoom = UI.projects.superalgos.spaces.chartingSpace.viewport.unTransformThisPoint(targetPoint)
let mouseNoZoom = UI.projects.superalgos.spaces.chartingSpace.viewport.unTransformThisPoint(mousePosition)
let targetNoZoom = UI.projects.foundations.spaces.chartingSpace.viewport.unTransformThisPoint(targetPoint)
let mouseNoZoom = UI.projects.foundations.spaces.chartingSpace.viewport.unTransformThisPoint(mousePosition)
displaceVector = {
x: mouseNoZoom.x - targetNoZoom.x,
+19 -19
View File
@@ -20,12 +20,12 @@ function newVideoRecorder() {
const DISTANCE_BETWEEN_ICONS = 35
const ICON_SIZES = 50
let mousePointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-pointer')
let draggingIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'hand-drag')
let mousePointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-pointer')
let draggingIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'hand-drag')
let leftClickIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-left-click')
let rightClickIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-right-click')
let wheelClickIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-wheel-click')
let leftClickIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-left-click')
let rightClickIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-right-click')
let wheelClickIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-wheel-click')
let imagePosition
let buttonPressedIcon
@@ -45,10 +45,10 @@ function newVideoRecorder() {
case 'wheel': {
wheelAnimationCounter = 25
if (canvas.mouse.event.delta > 0) {
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-wheel-up')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-wheel-up')
lastWheelPointerIcon = pointerIcon
} else {
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'mouse-wheel-down')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'mouse-wheel-down')
lastWheelPointerIcon = pointerIcon
}
@@ -65,27 +65,27 @@ function newVideoRecorder() {
switch (key.toLowerCase()) {
case 'escape':
{
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-m')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-m')
break
}
case 'm':
{
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-m')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-m')
break
}
case 'a':
{
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-a')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-a')
break
}
case 'r':
{
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-r')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-r')
break
}
case 'c':
{
pointerIcon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-r')
pointerIcon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-r')
break
}
}
@@ -139,7 +139,7 @@ function newVideoRecorder() {
drawMousePointer(buttonPressedIcon, imagePosition, ICON_SIZES)
if (canvas.mouse.event.shiftKey === true) {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-shift')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-shift')
imagePosition = {
x: canvas.mouse.position.x - DISTANCE_BETWEEN_ICONS * 3,
y: canvas.mouse.position.y + firstRow
@@ -148,7 +148,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.ctrlKey === true || canvas.mouse.event.metaKey === true) {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-ctrl')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-ctrl')
imagePosition = {
x: canvas.mouse.position.x - DISTANCE_BETWEEN_ICONS * 3,
y: canvas.mouse.position.y + secondRow
@@ -157,7 +157,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.altKey === true) {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-alt')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-alt')
imagePosition = {
x: canvas.mouse.position.x + DISTANCE_BETWEEN_ICONS * 3 + ICON_SIZES * 0,
y: canvas.mouse.position.y + secondRow
@@ -166,7 +166,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.code === 'ArrowUp') {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-up')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-up')
imagePosition = {
x: canvas.mouse.position.x - 0,
y: canvas.mouse.position.y + firstRow
@@ -175,7 +175,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.code === 'ArrowDown') {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-down')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-down')
imagePosition = {
x: canvas.mouse.position.x - 0,
y: canvas.mouse.position.y + secondRow
@@ -184,7 +184,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.code === 'ArrowLeft') {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-left')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-left')
imagePosition = {
x: canvas.mouse.position.x - DISTANCE_BETWEEN_ICONS * 0 - ICON_SIZES * 1,
y: canvas.mouse.position.y + secondRow
@@ -193,7 +193,7 @@ function newVideoRecorder() {
}
if (canvas.mouse.event.code === 'ArrowRight') {
icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndName( 'Superalgos', 'key-right')
icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName( 'Foundations', 'key-right')
imagePosition = {
x: canvas.mouse.position.x + DISTANCE_BETWEEN_ICONS * 0 + ICON_SIZES * 1,
y: canvas.mouse.position.y + secondRow