(poe)
| 1655 | lbl.remove(); |
| 1656 | } |
| 1657 | } |
| 1658 | |
| 1659 | // Drop out of search mode without re-selecting a layer (the caller does that). |
| 1660 | function _netDiagClearSearchState() { |
| 1661 | _netDiagSearching = false; |
| 1662 | const input = document.getElementById('net-diag-search'); |
| 1663 | if (input) input.value = ''; |
| 1664 | const clearBtn = document.getElementById('net-diag-search-clear'); |
| 1665 | if (clearBtn) clearBtn.classList.add('hidden'); |
| 1666 | const count = document.getElementById('net-diag-search-count'); |
| 1667 | if (count) { count.textContent = ''; count.classList.add('hidden'); } |
| 1668 | document.querySelectorAll('#net-sub-diagnostics .diag-search-hidden') |
| 1669 | .forEach(e => e.classList.remove('diag-search-hidden')); |
| 1670 | document.querySelectorAll('#net-sub-diagnostics .diag-search-layerlabel') |
| 1671 | .forEach(e => e.remove()); |
| 1672 | } |
| 1673 | |
| 1674 | function netDiagSearch(q) { |
| 1675 | const terms = (q || '').trim().toLowerCase().split(/\s+/).filter(Boolean); |
| 1676 | if (!terms.length) { // cleared -> back to normal layer view |
| 1677 | _netDiagClearSearchState(); |
no test coverage detected