progress as html

This commit is contained in:
Matt Walsh 2022-08-05 12:05:14 -05:00
parent aaa5fd362f
commit 0cecf8a458

View file

@ -449,18 +449,16 @@ class WeatherDisplay {
loadTemplates() {
this.templates = {};
if (this.elemId !== 'progress') {
this.elem = document.getElementById(`${this.elemId}-html`);
if (!this.elem) return;
const templates = this.elem.querySelectorAll('.template');
templates.forEach((template) => {
const className = template.classList[0];
const node = template.cloneNode(true);
node.classList.remove('template');
this.templates[className] = node;
template.remove();
});
}
this.elem = document.getElementById(`${this.elemId}-html`);
if (!this.elem) return;
const templates = this.elem.querySelectorAll('.template');
templates.forEach((template) => {
const className = template.classList[0];
const node = template.cloneNode(true);
node.classList.remove('template');
this.templates[className] = node;
template.remove();
});
}
fillTemplate(name, fillValues) {