From 2e944c6d01bd24a95bb4a320bd866ac926093538 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 12 Feb 2020 08:07:54 +0100 Subject: [PATCH] Bug Fixed --- ChartsSpace/ViewPort.js | 11 ++++++++--- Spaces/ChartSpace.js | 1 + SplashScreen.js | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChartsSpace/ViewPort.js b/ChartsSpace/ViewPort.js index 77c7063b0..d2bced074 100644 --- a/ChartsSpace/ViewPort.js +++ b/ChartsSpace/ViewPort.js @@ -34,6 +34,7 @@ function newViewport () { transformThisPoint: transformThisPoint, unTransformThisPoint: unTransformThisPoint, isThisPointVisible: isThisPointVisible, + isThisPointInViewport: isThisPointInViewport, fitIntoVisibleArea: fitIntoVisibleArea, displace: displace, physics: physics, @@ -311,11 +312,15 @@ function newViewport () { } function isThisPointVisible (point) { - if (visibleArea === undefined) { - getVisibleArea() + if (point.x < thisObject.visibleArea.topLeft.x || point.x > thisObject.visibleArea.bottomRight.x || point.y < thisObject.visibleArea.topLeft.y || point.y > thisObject.visibleArea.bottomRight.y) { + return false + } else { + return true } + } - if (point.x < visibleArea.topLeft.x || point.x > visibleArea.bottomRight.x || point.y < visibleArea.topLeft.y || point.y > visibleArea.bottomRight.y) { + function isThisPointInViewport (point) { + if (point.y > browserCanvas.height - COCKPIT_SPACE_POSITION) { return false } else { return true diff --git a/Spaces/ChartSpace.js b/Spaces/ChartSpace.js index 333b98fc5..44c85fe49 100644 --- a/Spaces/ChartSpace.js +++ b/Spaces/ChartSpace.js @@ -112,6 +112,7 @@ function newChartSpace () { function getContainer (point, purpose) { if (thisObject.visible !== true) { return } + if (thisObject.viewport.isThisPointInViewport(point) === false) { return } let container diff --git a/SplashScreen.js b/SplashScreen.js index b81e8352a..5fe6da376 100644 --- a/SplashScreen.js +++ b/SplashScreen.js @@ -97,7 +97,7 @@ function newSplashScreen () { /* Second the % of Advance. */ let label = '' + Math.trunc(stepsInitializationCounter) + ' %' - stepsInitializationCounter = stepsInitializationCounter + 2.0 + stepsInitializationCounter = stepsInitializationCounter + 5.0 if (stepsInitializationCounter > 99) { splashScreenNeeded = false