Performance Fixes
This commit is contained in:
1 parent
aee420e01e
commit
df07e2e7d8
2 files changed
+5
-11
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -451,7 +451,7 @@ function newFileCursor() {
|
||||
if (endDateRange !== undefined) {
|
||||
let compareEndDate = removeTime(endDateRange)
|
||||
|
||||
if (compareTargetDate.valueOf() > compareEndDate.valueOf()) {
|
||||
if (compareTargetDate.valueOf() >= compareEndDate.valueOf()) {
|
||||
controlLoop()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user