auto snap changed to 1 meter
All checks were successful
Build and deploy / Build and Push Docker Images (push) Successful in 2m25s

This commit is contained in:
2025-12-14 21:10:52 +05:00
parent 7eaf1b3b86
commit d85849debe

View File

@@ -37,7 +37,7 @@ export function DrawingHandler({ mapId, onItemCreated }: DrawingHandlerProps) {
}, [mapId]);
// Find nearby device for snapping (exclude info markers)
const findNearbyDevice = (lat: number, lng: number, radiusMeters = 5): any | null => {
const findNearbyDevice = (lat: number, lng: number, radiusMeters = 1): any | null => {
const devices = allItems.filter(item =>
['switch', 'indoor_ap', 'outdoor_ap', 'other_device'].includes(item.type) &&
item.geometry.type === 'Point'
@@ -151,7 +151,7 @@ export function DrawingHandler({ mapId, onItemCreated }: DrawingHandlerProps) {
// Wireless mesh - connect AP to AP only
if (isWirelessTool) {
// Must click on an AP
const ap = findNearbyDevice(lat, lng, 5);
const ap = findNearbyDevice(lat, lng, 1);
if (!ap || !['indoor_ap', 'outdoor_ap'].includes(ap.type)) {
showToast('Wireless mesh can only connect between Access Points. Please click on an AP.', 'error');
return;