Browse Source

Display loading animation when updating the heatmap

pull/51/head
Starbeamrainbowlabs 3 years ago
parent
commit
58d40f8f4e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 3
      client_src/css/main.css
  2. 7
      client_src/js/UI.mjs

3
client_src/css/main.css

@ -59,7 +59,7 @@ button.selected { @@ -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 { @@ -71,5 +71,6 @@ button.selected {
background: url(images/spinning-circles.svg) center center / 25% no-repeat;
cursor: progress !important;
pointer-events: none;
}

7
client_src/js/UI.mjs

@ -54,10 +54,13 @@ class UI { @@ -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…
Cancel
Save