From 69cce193bb778c8489051112402996640e3d6746 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 3 May 2019 16:20:38 +0200 Subject: [PATCH] turning chartspace invisible works --- Spaces/ChartSpace.js | 7 +++++-- Spaces/PanelsSpace.js | 5 +++++ StrategySpace/StrategyCollectionItem.js | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Spaces/ChartSpace.js b/Spaces/ChartSpace.js index 25f51f709..3a25d6cc7 100644 --- a/Spaces/ChartSpace.js +++ b/Spaces/ChartSpace.js @@ -14,6 +14,7 @@ function newChartSpace () { logger.fileName = MODULE_NAME let thisObject = { + visible: true, container: undefined, drawBackground: drawBackground, draw: draw, @@ -83,6 +84,8 @@ function newChartSpace () { } function drawBackground () { + if (thisObject.visible !== true) { return } + for (var i = 0; i < thisObject.timeMachines.length; i++) { var timeMachine = thisObject.timeMachines[i] timeMachine.drawBackground() @@ -90,7 +93,7 @@ function newChartSpace () { } function draw () { - // thisObject.container.frame.draw(false, false) + if (thisObject.visible !== true) { return } for (var i = 0; i < thisObject.timeMachines.length; i++) { var timeMachine = thisObject.timeMachines[i] @@ -99,7 +102,7 @@ function newChartSpace () { } function getContainer (point, purpose) { - if (INFO_LOG === true) { logger.write('[INFO] getContainer -> Entering function.') } + if (thisObject.visible !== true) { return } let container diff --git a/Spaces/PanelsSpace.js b/Spaces/PanelsSpace.js index 151d5af65..74b00c25e 100644 --- a/Spaces/PanelsSpace.js +++ b/Spaces/PanelsSpace.js @@ -6,6 +6,7 @@ The Panel Space y the place wehre all panels live, no matter who create them. function newPanelsSpace () { let thisObject = { + visible: true, container: undefined, createNewPanel: createNewPanel, destroyPanel: destroyPanel, @@ -100,6 +101,8 @@ function newPanelsSpace () { } function draw () { + if (thisObject.visible !== true) { return } + thisObject.container.frame.draw(false, false) thisObject.panels = panelsMap.get('Global') @@ -120,6 +123,8 @@ function newPanelsSpace () { } function getContainer (point) { + if (thisObject.visible !== true) { return } + let container /* diff --git a/StrategySpace/StrategyCollectionItem.js b/StrategySpace/StrategyCollectionItem.js index b01964b16..e982517b0 100644 --- a/StrategySpace/StrategyCollectionItem.js +++ b/StrategySpace/StrategyCollectionItem.js @@ -37,6 +37,8 @@ function newStrategyCollectionItem () { } function onMouseClick (event) { + canvas.chartSpace.visible = false + canvas.panelsSpace.visible = false generateStrategyParts() }