MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / loadNetworkData

Function loadNetworkData

web/scripts/ragnar_modern.js:2870–2881  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2868// Draw the passive survey into one canvas. The in-page chart and the
2869// full-screen console differ only in scale, so they share this — `big` bumps
2870// type and padding for the large surface. Every AP's plotted box is recorded on
2871// the canvas (`_wifiHits`) together with the plot geometry (`_wifiGeom`), which
2872// is what lets hover and click map a pixel back to a BSSID.
2873function _wifiDrawSpectrumInto(canvas, opts) {
2874 const d = _wifiState.data; if (!d || !canvas) return;
2875 const o = opts || {};
2876 const K = o.big ? 1.3 : 1; // type / padding scale
2877 const dpr = window.devicePixelRatio || 1;
2878 const W = canvas.clientWidth, H = Math.round(o.height || canvas.clientHeight || 360);
2879 if (W < 20 || H < 20) return;
2880 canvas.width = W * dpr; canvas.height = H * dpr;
2881 canvas._wifiHits = [];
2882 const ctx = canvas.getContext('2d'); ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
2883 ctx.clearRect(0, 0, W, H);
2884 const padL = Math.round(40 * K), padR = Math.round(12 * K),

Callers 6

showNetworkSubtabFunction · 0.70
preloadAllTabsFunction · 0.70
loadTabDataFunction · 0.70
handleScanHostUpdateFunction · 0.70
handleScanCompletedFunction · 0.70
handleDeepScanUpdateFunction · 0.70

Calls 4

errorMethod · 0.80
loadStableNetworkDataFunction · 0.70
addConsoleMessageFunction · 0.70

Tested by

no test coverage detected