From 31af37467c4a756e092d08339592ceb6d9201e69 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Mon, 12 Feb 2024 16:22:57 -0600 Subject: [PATCH] maint: formatting --- static/lib.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/static/lib.js b/static/lib.js index 569adec..5b21721 100644 --- a/static/lib.js +++ b/static/lib.js @@ -31,22 +31,22 @@ class TimeseriesGraph extends HTMLElement { attributeChanged(name, _oldValue, newValue) { switch (name) { - case 'uri': + case 'uri': this.#uri = newValue; break; - case 'width': + case 'width': this.#width = newValue; break; - case 'height': + case 'height': this.#height = newValue; break; - case 'poll-seconds': + case 'poll-seconds': this.#pollSeconds = newValue; break; - case 'label': + case 'label': this.#label = newValue; break; - default: // do nothing; + default: // do nothing; break; } this.resetInterval(); @@ -71,14 +71,14 @@ class TimeseriesGraph extends HTMLElement { console.log("targetNode: ", this.#targetNode); return this.#targetNode; } - + stopInterval() { if (this.#intervalId) { clearInterval(this.#intervalId); this.#intervalId = null; } } - + resetInterval() { this.stopInterval() if (this.#uri) { @@ -92,7 +92,7 @@ class TimeseriesGraph extends HTMLElement { customElements.define(TimeseriesGraph.elementName, TimeseriesGraph); } } - + async fetchData() { const response = await fetch(this.#uri); const data = await response.json();