mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-25 06:53:00 +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;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
.working { cursor: progress; }
|
.working { cursor: progress !important; }
|
||||||
|
|
||||||
.working-visual::after {
|
.working-visual::after {
|
||||||
content: "";
|
content: "";
|
||||||
|
@ -71,5 +71,6 @@ button.selected {
|
||||||
|
|
||||||
background: url(images/spinning-circles.svg) center center / 25% no-repeat;
|
background: url(images/spinning-circles.svg) center center / 25% no-repeat;
|
||||||
|
|
||||||
|
cursor: progress !important;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,13 @@ class UI {
|
||||||
type: "select",
|
type: "select",
|
||||||
name: "Reading Type",
|
name: "Reading Type",
|
||||||
items: this.reading_types.map((type) => type.friendly_text),
|
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;
|
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)
|
}).bind(this)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue