Device info: change default tab from info to data

pull/26/head
Starbeamrainbowlabs 4 years ago
parent 043b16e732
commit 88f0d5615c
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 8
      client_src/js/LayerDeviceMarkers.mjs

@ -90,11 +90,11 @@ class LayerDeviceMarkers {
let tabContainer = CreateElement("div.tab-container",
CreateElement("ul.tabs",
CreateElement("li", CreateElement("a.tab.active", "Info")),
CreateElement("li", CreateElement("a.tab", "Data"))
CreateElement("li", CreateElement("a.tab", "Info")),
CreateElement("li", CreateElement("a.tab.active", "Data"))
),
CreateElement("div.tab-panes",
CreateElement("div.device-params.tab-pane.active")
CreateElement("div.device-params.tab-pane")
// The tab pane for the graph is added dynamically below
)
);
@ -147,7 +147,7 @@ class LayerDeviceMarkers {
chart_device_data.setup("PM25").then(() =>
console.info("[layer/markers] Device chart setup complete!")
);
chart_device_data.display.classList.add("tab-pane");
chart_device_data.display.classList.add("tab-pane", "active");
tabContainer.querySelector(".tab-panes").appendChild(chart_device_data.display);

Loading…
Cancel
Save