Nasty Bug preventing daily files to be plotted

This commit is contained in:
Luis Fernando Molina committed 2020-01-19 12:06:18 +01:00
1 parent 0c8d7a1e97
commit df785830d0
4 files changed
+9 -11

No files matched your search

+6 -7
View File
@@ -62,8 +62,7 @@ function getTransparenceFactor (timeFrame) {
}
function recalculatePeriod (zoomLevel) {
// console.log(" recalculatePeriod > " + zoomLevel);
console.log('NEW ZOOM LEVEL', zoomLevel)
if (zoomLevel > 400) {
return _1_MINUTE_IN_MILISECONDS
}
@@ -116,23 +115,23 @@ function recalculatePeriod (zoomLevel) {
return _2_HOURS_IN_MILISECONDS
}
if (zoomLevel > 90) {
if (zoomLevel > 80) {
return _3_HOURS_IN_MILISECONDS
}
if (zoomLevel > 70) {
if (zoomLevel > 50) {
return _4_HOURS_IN_MILISECONDS
}
if (zoomLevel > 50) {
if (zoomLevel > 35) {
return _6_HOURS_IN_MILISECONDS
}
if (zoomLevel > 30) {
if (zoomLevel > 20) {
return _8_HOURS_IN_MILISECONDS
}
if (zoomLevel > 15) {
if (zoomLevel > 10) {
return _12_HOURS_IN_MILISECONDS
}
+1 -2
View File
@@ -283,8 +283,7 @@ function newTimelineChart () {
center = timelineChartCoordinateSystem.unInverseTransform(center, thisObject.container.frame.height)
}
let newDate = new Date(0)
newDate.setUTCSeconds(center.x)
let newDate = new Date(center.x)
datetime = newDate
+1 -1
View File
@@ -361,7 +361,7 @@ function newViewport () {
function newZoomLevel (level) {
thisObject.zoomLevel = level
thisObject.zoomTargetLevel = level
// INITIAL_TIME_PERIOD = recalculatePeriod(level)
INITIAL_TIME_PERIOD = recalculatePeriod(level)
saveObjectState()
ANIMATION_INCREMENT = 0
+1 -1
View File
@@ -275,7 +275,7 @@ function newTimeFrameScale () {
let timeFrameArray = timeFramesMasterArray[filePeriodIndex]
thisObject.timeFrame = timeFrameArray[timeFrameIndex][0]
timeFrameLabel = timeFrameArray[timeFrameIndex][1]
console.log('NEW TIME FRAME LABEL', timeFrameLabel)
let event = {}
event.timeFrame = thisObject.timeFrame
thisObject.container.eventHandler.raiseEvent('Time Frame Changed', event)