Fixed bad function ref
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
@@ -52,13 +52,12 @@ class ClimateChart {
|
||||
throw new Error(`improper HTML element passed, needed type canvas, got ${canvasElement.tagName}`);
|
||||
}
|
||||
this.chart = new Chart(ctx, generateClimateChartConfig({}));
|
||||
setInterval(this.doUpdateInterval, 30 * 1000);
|
||||
await this.doUpdateInterval();
|
||||
await this.update();
|
||||
this.onLoadedCallback();
|
||||
}
|
||||
|
||||
private async doUpdateInterval() {
|
||||
await this.updateFromServer().catch(e => this.logError(e));
|
||||
async update() {
|
||||
return this.updateFromServer().catch(e => this.logError(e));
|
||||
}
|
||||
|
||||
private async getNewSnapshots(): Promise<SnapshotRecords> {
|
||||
|
||||
@@ -32,6 +32,7 @@ document.onreadystatechange = (e) => {
|
||||
const climateChart = createClimateChart();
|
||||
climateChart.onLoaded(() => {
|
||||
overlay.classList.add('hidden');
|
||||
setInterval(() => climateChart.update(), 30 * 1000);
|
||||
});
|
||||
climateChart.onErrored((e) => {
|
||||
overlay.classList.remove('hidden');
|
||||
|
||||
Reference in New Issue
Block a user