Update how spinner visibility is controlled

This commit is contained in:
toasted-nutbread 2019-12-27 15:10:51 -05:00
parent a50e2fb0f1
commit 24832be636
4 changed files with 5 additions and 8 deletions

View File

@ -43,9 +43,7 @@
</span> </span>
</form> </form>
<div id="spinner"> <div id="spinner" hidden><img src="/mixed/img/spinner.gif"></div>
<img src="/mixed/img/spinner.gif">
</div>
<div class="scan-disable"> <div class="scan-disable">
<div id="query-parser-select" class="input-group"></div> <div id="query-parser-select" class="input-group"></div>

View File

@ -15,9 +15,7 @@
<link rel="stylesheet alternate" type="text/css" href="/mixed/css/display-dark.css" data-yomichan-theme-name="dark"> <link rel="stylesheet alternate" type="text/css" href="/mixed/css/display-dark.css" data-yomichan-theme-name="dark">
</head> </head>
<body> <body>
<div id="spinner"> <div id="spinner" hidden><img src="/mixed/img/spinner.gif"></div>
<img src="/mixed/img/spinner.gif">
</div>
<div id="navigation-header" class="navigation-header" hidden><div class="navigation-header-actions"> <div id="navigation-header" class="navigation-header" hidden><div class="navigation-header-actions">
<button class="action-button action-previous"><img src="/mixed/img/source-term.svg" class="icon-image" title="Source term (Alt + B)" alt></button> <button class="action-button action-previous"><img src="/mixed/img/source-term.svg" class="icon-image" title="Source term (Alt + B)" alt></button>

View File

@ -50,7 +50,6 @@ ol, ul {
} }
#spinner { #spinner {
display: none;
position: fixed; position: fixed;
z-index: 1; z-index: 1;
right: 0.36em; right: 0.36em;

View File

@ -705,7 +705,9 @@ class Display {
} }
setSpinnerVisible(visible) { setSpinnerVisible(visible) {
this.spinner.style.display = visible ? 'block' : ''; if (this.spinner !== null) {
this.spinner.hidden = !visible;
}
} }
getEntry(index) { getEntry(index) {