diff --git a/javascript/gallery.js b/javascript/gallery.js index 7660ab6e7..bc84acaa9 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -120,12 +120,12 @@ class SimpleProgressBar { #monitoredSet; constructor(monitoredSet) { - this.#monitoredSet = monitoredSet; // This is required because incrementing a variable with a class method turned out to not be an atomic operation - this.#container.style.cssText = 'position:relative;overflow:hidden;border-radius:var(--sd-border-radius);width:100%;background-color:hsla(0,0%,36%,0.3);height:1.2rem;margin:0;padding:0;display:none;' - this.#progress.style.cssText = 'position:absolute;left:0;height:100%;width:0;transition:width 200ms;' - this.#progress.style.backgroundColor = 'hsla(110, 32%, 35%, 0.80)'; // alt: '#27911d' + this.#monitoredSet = monitoredSet; // This is required because incrementing a variable with a class method turned out to not be an atomic operation + this.#container.style.cssText = 'position:relative;overflow:hidden;border-radius:var(--sd-border-radius);width:100%;background-color:hsla(0,0%,36%,0.3);height:1.2rem;margin:0;padding:0;display:none;'; + this.#progress.style.cssText = 'position:absolute;left:0;height:100%;width:0;transition:width 200ms;'; + this.#progress.style.backgroundColor = 'hsla(110, 32%, 35%, 0.80)'; // alt: '#27911d' this.#textDiv.style.cssText = 'position:relative;margin:auto;width:max-content;height:100%;'; - this.#text.style.cssText = 'user-select:none;color:white;' + this.#text.style.cssText = 'user-select:none;color:white;'; this.#textDiv.append(this.#text); this.#container.append(this.#progress, this.#textDiv); @@ -169,7 +169,7 @@ class SimpleProgressBar { this.#visible = true; } if (loaded >= max) { - this.#stop() + this.#stop(); this.#hideTimeout = setTimeout(() => { this.clear(); }, 1000);