(tab)
| 210 | } |
| 211 | |
| 212 | function setInspectorTab(tab) { |
| 213 | const t = tab === "selection" || tab === "code" ? tab : "project"; |
| 214 | inspectorTabBtns.forEach((btn) => { |
| 215 | const isActive = btn.getAttribute("data-inspector-tab") === t; |
| 216 | btn.setAttribute("aria-selected", isActive ? "true" : "false"); |
| 217 | }); |
| 218 | if (inspectorProjectPanel) inspectorProjectPanel.hidden = t !== "project"; |
| 219 | if (inspectorSelectionPanel) inspectorSelectionPanel.hidden = t !== "selection"; |
| 220 | if (inspectorCodePanel) inspectorCodePanel.hidden = t !== "code"; |
| 221 | } |
| 222 | |
| 223 | function clamp(n, lo, hi) { |
| 224 | return Math.max(lo, Math.min(hi, n)); |
no outgoing calls
no test coverage detected