fixed blurry graphics, improvements to loading and caching

This commit is contained in:
Daniel Ledda
2021-03-23 10:41:17 +01:00
parent a810c5c71d
commit 942db5c18f
14 changed files with 86 additions and 66 deletions

View File

@@ -90,6 +90,7 @@ class AppStateStore {
stop = this.state.lastUpdateTime;
}
this.addLoad();
console.log(start, stop);
for (const timeseries of this.state.timeseries) {
await timeseries.updateFromWindow(start, stop);
}
@@ -101,6 +102,7 @@ class AppStateStore {
}
private async getNewTimeseriesData() {
const updateTime = new Date().getTime() / 1000;
this.addLoad();
for (const timeseries of this.state.timeseries) {
await timeseries.getLatest();
@@ -110,7 +112,7 @@ class AppStateStore {
this.notifyStoreVal("timeseries");
this.eventCallbacks["timeseriesUpdated"].forEach(cb => cb(timeseries));
}
this.setLastUpdateTime(new Date().getTime() / 1000);
this.setLastUpdateTime(updateTime);
}
getState(): AppState {