Update Plotter.js

This commit is contained in:
Luis Fernando Molina committed 2020-08-15 11:14:55 +02:00
1 parent 7765c989ed
commit 066bb358c0
1 file changed
+4 -10
+4 -10
View File
@@ -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) {