test: cover lazy map and rig startup flows
This commit is contained in:
@@ -5499,12 +5499,10 @@ function navigateToTab(name, options = {}) {
|
||||
const panel = document.getElementById(`tab-${name}`);
|
||||
if (!panel) return;
|
||||
panel.style.display = "";
|
||||
const tmpl = panel.querySelector("template");
|
||||
if (tmpl) {
|
||||
panel.appendChild(tmpl.content.cloneNode(true));
|
||||
tmpl.remove();
|
||||
panel.querySelectorAll(".sub-tab-bar").forEach(_wireSubTabBar);
|
||||
if (decoderRegistry.length) applyDecoderRegistryVisibility();
|
||||
materializeTabPanel(panel);
|
||||
if (name === "map" || name === "statistics") {
|
||||
const peer = document.getElementById(name === "map" ? "tab-statistics" : "tab-map");
|
||||
if (peer) materializeTabPanel(peer);
|
||||
}
|
||||
if (updateHistory) {
|
||||
updateTabHistory(name, replaceHistory);
|
||||
@@ -5523,6 +5521,15 @@ function navigateToTab(name, options = {}) {
|
||||
void refreshRecorderStatus();
|
||||
}
|
||||
}
|
||||
function materializeTabPanel(panel) {
|
||||
const tmpl = panel.querySelector("template");
|
||||
if (tmpl) {
|
||||
panel.appendChild(tmpl.content.cloneNode(true));
|
||||
tmpl.remove();
|
||||
panel.querySelectorAll(".sub-tab-bar").forEach(_wireSubTabBar);
|
||||
if (decoderRegistry.length) applyDecoderRegistryVisibility();
|
||||
}
|
||||
}
|
||||
window.navigateToTab = navigateToTab;
|
||||
requiredElement("tab-bar").addEventListener("click", (e) => {
|
||||
const btn = e.target instanceof Element ? e.target.closest(".tab[data-tab]") : null;
|
||||
|
||||
Reference in New Issue
Block a user