From 7a27acb32a7c20e1b9f80b513cead8d29ff38a75 Mon Sep 17 00:00:00 2001 From: dorian Date: Sun, 14 Jul 2019 22:02:35 +0200 Subject: [PATCH] minor patch --- js/dashboard.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/js/dashboard.js b/js/dashboard.js index 0314bf3..4cb3cd9 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -13,7 +13,11 @@ class BlueWeatherDashboard { this.params = { loc: 1, page: -1, - maxVals: 100 + maxVals: 100, + range: { + from: "", + to: "" + } } this.restoreParms(this.params) @@ -188,7 +192,8 @@ class BlueWeatherDashboard { mainContent.appendChild(tableContainer) } else if (page !== -1) { - dashboard.loadDiagram("mainContent", locationData, page) + mainContent.innerHTML = "" + dashboard.loadDiagram(mainContent, locationData, page) } loader.style = "position: absolute; left: 50%; opacity: 0;" @@ -243,7 +248,13 @@ class BlueWeatherDashboard { } loadDiagram(parentId, locationData, sensorId) { - mainContent = document.getElementById(parentId) + if(typeof(parentId) === "string"){ + mainContent = document.getElementById(parentId) + } + else { + mainContent = parentId + } + // get all relevant meassurement values var vals = []