mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-22 10:25:01 +00:00
Display loading animation when updating the heatmap
This commit is contained in:
parent
7eb3519319
commit
58d40f8f4e
2 changed files with 7 additions and 3 deletions
|
@ -59,7 +59,7 @@ button.selected {
|
|||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.working { cursor: progress; }
|
||||
.working { cursor: progress !important; }
|
||||
|
||||
.working-visual::after {
|
||||
content: "";
|
||||
|
@ -71,5 +71,6 @@ button.selected {
|
|||
|
||||
background: url(images/spinning-circles.svg) center center / 25% no-repeat;
|
||||
|
||||
cursor: progress !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
|
@ -54,10 +54,13 @@ class UI {
|
|||
type: "select",
|
||||
name: "Reading Type",
|
||||
items: this.reading_types.map((type) => type.friendly_text),
|
||||
callback: ((event) => {
|
||||
callback: (async (event) => {
|
||||
let new_type = this.reading_types.find((type) => type.friendly_text == event.target.value).short_descr;
|
||||
|
||||
this.map_manager.overlay.update_reading_type(new_type);
|
||||
|
||||
document.querySelector("main").classList.add("working-visual");
|
||||
await this.map_manager.overlay.update_reading_type(new_type);
|
||||
document.querySelector("main").classList.remove("working-visual");
|
||||
}).bind(this)
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue