Almost there
This commit is contained in:
2
webapp/dist/main.js
vendored
2
webapp/dist/main.js
vendored
File diff suppressed because one or more lines are too long
4
webapp/dist/styles.css
vendored
4
webapp/dist/styles.css
vendored
@@ -5,7 +5,7 @@ html, body {
|
||||
|
||||
.overlay {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
transition: opacity 1s, display 1s;
|
||||
transition: opacity 1s;
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ html, body {
|
||||
|
||||
.hidden {
|
||||
opacity: 0%;
|
||||
display: none;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
|
||||
@@ -64,7 +64,7 @@ class ClimateChart {
|
||||
this.chart = new Chart(ctx, generateClimateChartConfig({}));
|
||||
try {
|
||||
const payload = await this.getInitialDataBlob();
|
||||
this.latestSnapshot = payload.snapshots[payload.snapshots.length - 1];
|
||||
this.latestSnapshot = payload.snapshots[0];
|
||||
this.insertSnapshots(...payload.snapshots);
|
||||
setInterval(() => this.updateFromServer(), 30 * 1000);
|
||||
this.chart.update();
|
||||
@@ -94,7 +94,7 @@ class ClimateChart {
|
||||
try {
|
||||
const payload: SnapshotRecords = await (await fetch(url)).json();
|
||||
if (payload.snapshots.length > 0) {
|
||||
this.latestSnapshot = payload.snapshots[payload.snapshots.length - 1];
|
||||
this.latestSnapshot = payload.snapshots[0];
|
||||
this.removeExpiredData(currentTime);
|
||||
this.insertSnapshots(...payload.snapshots);
|
||||
this.chart.update();
|
||||
|
||||
Reference in New Issue
Block a user