From 761a922946c8b480271fed790e562cc4cfc5fe34 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 27 Oct 2020 11:16:34 +0100 Subject: [PATCH] Order of TimeLibe Charts inverted --- .../ChartingSpaceFunctions.js | 62 ++++++++++--------- .../CryptoEcosystemFunctions.js | 9 ++- 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/Projects/Superalgos/Function-Libraries/ChartingSpaceFunctions.js b/Projects/Superalgos/Function-Libraries/ChartingSpaceFunctions.js index 30b99b63a..0765fd6f1 100644 --- a/Projects/Superalgos/Function-Libraries/ChartingSpaceFunctions.js +++ b/Projects/Superalgos/Function-Libraries/ChartingSpaceFunctions.js @@ -120,37 +120,8 @@ function newChartingSpaceFunctions() { timeMachine.timeScale.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 timeMachine.rateScale.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 /* - We need to create a Timeline Chart for each Data Mine Indicators. + We will create 3 Time Line Charts for the Trading Mine Products */ - mineProducts = UI.projects.superalgos.utilities.branches.nodeBranchToArray(networkNode, 'Data Mine Products') - for (let j = 0; j < mineProducts.length; j++) { - let mineProduct = mineProducts[j] - /* - We need to filter out the ones that do not belong to the market where - the session is running at. - */ - if (mineProduct.payload.parentNode.payload.referenceParent === undefined) { continue } - if (mineProduct.payload.parentNode.payload.referenceParent.id !== market.id) { continue } - - let timelineChart = functionLibraryUiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart') - /* - The Mine Product Node might be collapesd and since its creation it never - received the physics call, so we will do the call so that it properly - sets its own name, which we are going to reuse here. - */ - mineProduct.payload.uiObject.invisiblePhysics() - timelineChart.name = mineProduct.name - timelineChart.layerManager.payload.referenceParent = mineProduct - timelineChart.payload.floatingObject.collapseToggle() - timelineChart.layerManager.payload.floatingObject.collapseToggle() - timelineChart.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 - timelineChart.layerManager.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 - - let menu = timelineChart.layerManager.payload.uiObject.menu - menu.internalClick('Add All Mine Layers') - menu.internalClick('Add All Mine Layers') - } - mineProducts = UI.projects.superalgos.utilities.branches.nodeBranchToArray(networkNode, 'Trading Mine Products') for (let j = 0; j < mineProducts.length; j++) { let mineProduct = mineProducts[j] @@ -207,6 +178,37 @@ function newChartingSpaceFunctions() { } } } + /* + We need to create a Timeline Chart for each Data Mine Indicators. + */ + mineProducts = UI.projects.superalgos.utilities.branches.nodeBranchToArray(networkNode, 'Data Mine Products') + for (let j = 0; j < mineProducts.length; j++) { + let mineProduct = mineProducts[j] + /* + We need to filter out the ones that do not belong to the market where + the session is running at. + */ + if (mineProduct.payload.parentNode.payload.referenceParent === undefined) { continue } + if (mineProduct.payload.parentNode.payload.referenceParent.id !== market.id) { continue } + + let timelineChart = functionLibraryUiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart') + /* + The Mine Product Node might be collapesd and since its creation it never + received the physics call, so we will do the call so that it properly + sets its own name, which we are going to reuse here. + */ + mineProduct.payload.uiObject.invisiblePhysics() + timelineChart.name = mineProduct.name + timelineChart.layerManager.payload.referenceParent = mineProduct + timelineChart.payload.floatingObject.collapseToggle() + timelineChart.layerManager.payload.floatingObject.collapseToggle() + timelineChart.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 + timelineChart.layerManager.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 + + let menu = timelineChart.layerManager.payload.uiObject.menu + menu.internalClick('Add All Mine Layers') + menu.internalClick('Add All Mine Layers') + } } function addMissingDashboards(node, rootNodes, functionLibraryUiObjectsFromNodes, functionLibraryNodeDeleter) { diff --git a/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js b/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js index c9329af3c..ea929d6a1 100644 --- a/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js +++ b/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js @@ -206,7 +206,14 @@ function newCryptoEcosystemFunctions() { } } - function installMarket(node, rootNodes, functionLibraryUiObjectsFromNodes, functionLibraryNodeDeleter, functionLibraryChartingSpaceFunctions, functionLibraryDataStorageFunctions) { + function installMarket( + node, + rootNodes, + functionLibraryUiObjectsFromNodes, + functionLibraryNodeDeleter, + functionLibraryChartingSpaceFunctions, + functionLibraryDataStorageFunctions + ) { let market = node let cryptoExchange = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(node, 'Crypto Exchange', undefined, true, false, true, false)