()
| 2273 | // Sort so weaker drawn first (stronger on top) |
| 2274 | const aps = [...d.aps].filter(a => bands.includes(a.band)).sort((a, b) => (a.signal || -999) - (b.signal || -999)); |
| 2275 | aps.forEach(a => { |
| 2276 | const centerCh = a.center_freq ? _wifiFreqToChannel(a.center_freq) : a.channel; |
| 2277 | const half = a.width / 10; // channel-number half-width |
| 2278 | const seg = ranges[a.band]; |
| 2279 | const clamp = (x) => Math.max(seg.x0, Math.min(seg.x1, x)); |
| 2280 | const xC = clamp(xFor(a.band, centerCh)); |
| 2281 | const xL = clamp(xFor(a.band, centerCh - half)), xR = clamp(xFor(a.band, centerCh + half)); |
no test coverage detected