diff --git a/client_src/css/main.css b/client_src/css/main.css index 140c840..d31d30a 100644 --- a/client_src/css/main.css +++ b/client_src/css/main.css @@ -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; } diff --git a/client_src/js/UI.mjs b/client_src/js/UI.mjs index 5267470..9fe770f 100644 --- a/client_src/js/UI.mjs +++ b/client_src/js/UI.mjs @@ -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) }, {