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

Function resetScanButtons

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

Source from the content-addressed store, hash-verified

3408 return Math.hypot(px - (x1 + t * dx), py - (y1 + t * dy));
3409}
3410
3411// Screen-space radius (px) a column is drawn at — kept in sync with _wifiHmDrawDesign.
3412function _wifiHmColumnPxRadius(c, vp) {
3413 const floorM = _wifiHmFloorM();
3414 const pxPerM = vp.pw / (vp.span * floorM);
3415 return Math.max(5, (c.radius_m || 0.3) * pxPerM);
3416}
3417
3418// Hit-test a pointer position (p = {px,py,wx,wy,vp} from norm()) against AP
3419// nodes (top), column resize handles, column bodies, then wall endpoints, then
3420// wall bodies. Returns a drag descriptor (offsets in world/normalized coords)
3421// or null. Distances in CSS px.
3422function _wifiHmHitTest(p) {
3423 const { px, py, wx, wy, vp } = p, R = 12;
3424 for (let i = _wifiHm.predictAps.length - 1; i >= 0; i--) {

Callers 3

startRealtimeScanFunction · 0.70
handleScanCompletedFunction · 0.70
handleScanErrorFunction · 0.70

Calls 1

addMethod · 0.80

Tested by

no test coverage detected