From ceb463709c1bfaa1a10fc1b70981a1146d483a16 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 18 May 2019 22:04:43 +0200 Subject: [PATCH] BUG with Click in canvas fixed --- Canvas.js | 6 ++++++ CockpitSpace/RestartSimulation.js | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Canvas.js b/Canvas.js index 33e8e77d4..44b0f8a15 100644 --- a/Canvas.js +++ b/Canvas.js @@ -229,6 +229,11 @@ function newCanvas () { return } + if (container !== undefined && container.isClickeable === true) { + /* We dont want to mess up with the click */ + return + } + /* We check if the mouse is over a panel/ */ container = thisObject.panelsSpace.getContainer(point) @@ -641,3 +646,4 @@ function newCanvas () { } } } + diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index d722e7f77..6567ebba5 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -107,7 +107,7 @@ function newRestartSimulation () { thisObject.status = 'Restarting' await graphQlRestartSimulation(simulationParams) thisObject.status = 'Calculating' - counterTillNextState = 1500 + counterTillNextState = 2000 turnOffProductCards() } catch (err) { thisObject.status = 'Error' @@ -217,7 +217,7 @@ function newRestartSimulation () { switch (thisObject.status) { case 'Ready': - label = 'RESTART SIMULATION' + label = 'RESTART TRADING ENGINE' break case 'Restarting': label = 'RESTARTING...' @@ -231,7 +231,7 @@ function newRestartSimulation () { } let labelPoint = { - x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 15, + x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 25, y: thisObject.container.frame.height - 9 } labelPoint = thisObject.container.frame.frameThisPoint(labelPoint)