From f5fbb6e591fe5af9538fc62421ef1ede386e429b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 18 Apr 2019 09:18:58 +0200 Subject: [PATCH] Final adjustments to viewport changes --- Globals.js | 2 +- TimeMachine.js | 2 +- ViewPort.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Globals.js b/Globals.js index 44cb0d68b..92245ec4d 100644 --- a/Globals.js +++ b/Globals.js @@ -147,7 +147,7 @@ let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at let maxDate = new Date(); maxDate.setMilliseconds(0); -maxDate.setDate(maxDate.getDate() + 365 * 4); // We might have charts that projects data into the future. +maxDate.setDate(maxDate.getDate() + 365 * 1); // We might have charts that projects data into the future. const MIN_PLOTABLE_DATE = new Date(2015, 0, 1, 0, 0, 0); const MAX_PLOTABLE_DATE = maxDate; diff --git a/TimeMachine.js b/TimeMachine.js index ccc32f14f..edbd0e756 100644 --- a/TimeMachine.js +++ b/TimeMachine.js @@ -205,7 +205,7 @@ function newTimeMachine () { if (timeScale !== undefined) { timeScale.draw() } if (rigthScale !== undefined) { rigthScale.draw() } - thisObject.container.frame.draw(false, true, false) + // thisObject.container.frame.draw(false, true, false) } function getContainer (point, purpose) { diff --git a/ViewPort.js b/ViewPort.js index 5e11c1c65..0497ddbaf 100644 --- a/ViewPort.js +++ b/ViewPort.js @@ -358,8 +358,8 @@ function newViewPort () { let CROSS_SIZE = 5 - for (var i = startingX; i < thisObject.visibleArea.bottomRight.x; i = i + squareWidth) { - for (var j = startingY; j < thisObject.visibleArea.bottomRight.y; j = j + squareWidth) { + for (var i = startingX; i < thisObject.visibleArea.bottomRight.x + RIGHT_MARGIN; i = i + squareWidth) { + for (var j = startingY; j < thisObject.visibleArea.bottomRight.y + BOTTOM_MARGIN; j = j + squareWidth) { let point1 = { x: Math.trunc(i - CROSS_SIZE), y: Math.trunc(j) @@ -388,7 +388,7 @@ function newViewPort () { } } browserCanvasContext.closePath() - browserCanvasContext.strokeStyle = 'rgba(150, 150, 150, 1)' + browserCanvasContext.strokeStyle = 'rgba(150, 150, 150, 0.5)' browserCanvasContext.lineWidth = 1