()
| 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. |
| 3412 | function _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. |
| 3422 | function _wifiHmHitTest(p) { |
| 3423 | const { px, py, wx, wy, vp } = p, R = 12; |
| 3424 | for (let i = _wifiHm.predictAps.length - 1; i >= 0; i--) { |
no test coverage detected