also list midnight full-backup in historical view

This commit is contained in:
HF 2020-01-11 02:00:33 +01:00
parent 7abe936cd1
commit 8d2c5e75d9
3 changed files with 12 additions and 3 deletions

View File

@ -30,6 +30,7 @@
"react/jsx-one-expression-per-line": "off",
"react/jsx-closing-tag-location":"off",
"jsx-a11y/click-events-have-key-events":"off",
"no-continue": "off",
"lines-between-class-members":["warn", "always",{"exceptAfterSingleLine": true}]
}
}

View File

@ -23,7 +23,10 @@ async function getTimes(day, canvasId) {
const times = await response.json();
const parsedTimes = times
.map((a) => `${a.substr(0, 2)}:${a.substr(-2, 2)}`);
return parsedTimes;
return [
"00:00",
...parsedTimes,
];
} catch {
return [];
}

View File

@ -102,7 +102,11 @@ class Renderer {
}
updateOldHistoricalTime(historicalTime: string) {
this.oldHistoricalTime = historicalTime;
if (historicalTime === '0000') {
this.oldHistoricalTime = null;
} else {
this.oldHistoricalTime = historicalTime;
}
}
updateScale(
@ -443,7 +447,7 @@ class Renderer {
context.imageSmoothingEnabled = true;
}
const scale = (viewscale > SCALE_THREASHOLD) ? 1.0 : viewscale;
const scale = (viewscale > SCALE_THREASHOLD) ? 1.0 : viewscale;
// define how many chunks we will render
// don't render chunks outside of viewport
const { width, height } = viewport;
@ -514,6 +518,7 @@ class Renderer {
}
}
// incremential chunks
if (historicalTime === '0000') continue;
key = ChunkRGB.getKey(`${historicalDate}${historicalTime}`, cx, cy);
chunk = chunks.get(key);
if (chunk) {