MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / setUiExamplesTab

Function setUiExamplesTab

app.js:2580–2593  ·  view source on GitHub ↗
(tab)

Source from the content-addressed store, hash-verified

2578const uiExamplesPageByTab = { tft: 0, oled: 0 }; // 0-based
2579
2580function setUiExamplesTab(tab) {
2581 uiExamplesActiveTab = tab === "oled" ? "oled" : "tft";
2582 if (uiExamplesTabTft) {
2583 const active = uiExamplesActiveTab === "tft";
2584 uiExamplesTabTft.classList.toggle("active", active);
2585 uiExamplesTabTft.setAttribute("aria-selected", active ? "true" : "false");
2586 }
2587 if (uiExamplesTabOled) {
2588 const active = uiExamplesActiveTab === "oled";
2589 uiExamplesTabOled.classList.toggle("active", active);
2590 uiExamplesTabOled.setAttribute("aria-selected", active ? "true" : "false");
2591 }
2592 renderUiExamples();
2593}
2594
2595function renderUiExamples() {
2596 if (!uiExamplesList) return;

Callers 1

app.jsFile · 0.85

Calls 1

renderUiExamplesFunction · 0.85

Tested by

no test coverage detected