From 066bb358c03ac9022a74552f57fed24ea0e09b52 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 15 Aug 2020 11:14:55 +0200 Subject: [PATCH] Update Plotter.js --- Plotting/Plotter.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Plotting/Plotter.js b/Plotting/Plotter.js index acb4aaf2c..f2fdccf6c 100644 --- a/Plotting/Plotter.js +++ b/Plotting/Plotter.js @@ -94,6 +94,7 @@ function newPlotter() { function initialize(pStorage, pDatetime, pTimeFrame, pCoordinateSystem, callBackFunction, pProductDefinition) { try { + /* Store the information received. */ marketFiles = pStorage.marketFiles[0] dailyFiles = pStorage.dailyFiles[0] @@ -423,15 +424,6 @@ function newPlotter() { currentDate = new Date(currentDate.valueOf() + ONE_DAY_IN_MILISECONDS) } - /* Lests check if all the visible screen is going to be covered by candle-record. */ - let lowerEnd = leftDate.valueOf() - let upperEnd = rightDate.valueOf() - - if (records.length > 0) { - if (records[0].begin > lowerEnd || records[records.length - 1].end < upperEnd) { - setTimeout(recalculate, 2000) - } - } } catch (err) { if (ERROR_LOG === true) { logger.write('[ERROR] recalculateUsingDailyFiles -> err = ' + err.stack) } } @@ -897,7 +889,9 @@ function newPlotter() { } function onDragFinished() { - recalculate() + if (canvas.chartingSpace.visible === true) { + recalculate() + } } function onDisplace(event) {