MCPcopy
hub / github.com/cpaczek/skylight / atCurrent

Function atCurrent

web/src/control/Control.tsx:96–97  ·  view source on GitHub ↗
(p: { lat: number; lon: number })

Source from the content-addressed store, hash-verified

94 // --- saved location profiles (favorite airports) ---
95 const genId = () => Date.now().toString(36) + Math.random().toString(36).slice(2, 7);
96 const atCurrent = (p: { lat: number; lon: number }) =>
97 Math.abs(p.lat - cfg.centerLat) < 1e-4 && Math.abs(p.lon - cfg.centerLon) < 1e-4;
98 const switchToProfile = (p: LocationProfile) =>
99 set({ centerLat: p.lat, centerLon: p.lon, radiusMiles: p.radiusMiles, locationName: p.name });
100 const saveCurrentProfile = () => {

Callers 2

saveCurrentProfileFunction · 0.85
ControlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected