From 61de8736abf29a0cdc2f22f7525f3bc68347a62f Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 7 Apr 2024 20:29:02 +1200 Subject: [PATCH] don't mangle longitude on the node object so the ui can show the real value --- src/public/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/public/index.html b/src/public/index.html index 8fc68be..c6357f0 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -2574,7 +2574,7 @@ // wrap longitude for shortest path, everything to left of australia should be shown on the right var longitude = parseFloat(node.longitude); if(longitude <= 100){ - node.longitude = (longitude += 360); + longitude += 360; } // icon based on mqtt connection state @@ -2594,7 +2594,7 @@ } // create node marker - var marker = L.marker([node.latitude, node.longitude], { + var marker = L.marker([node.latitude, longitude], { icon: icon, tagName: node.node_id, // we want to show online nodes above offline, but without needing to use separate layer groups @@ -2767,7 +2767,7 @@ // wrap longitude for shortest path, everything to left of australia should be shown on the right var longitude = parseFloat(waypoint.longitude); if(longitude <= 100){ - waypoint.longitude = (longitude += 360); + longitude += 360; } // determine emoji to show as marker icon @@ -2777,7 +2777,7 @@ var tooltip = getTooltipContentForWaypoint(waypoint); // create waypoint marker - var marker = L.marker([waypoint.latitude, waypoint.longitude], { + var marker = L.marker([waypoint.latitude, longitude], { icon: L.divIcon({ className: 'waypoint-label', iconSize: [26, 26], // increase from 12px to 26px