don't mangle longitude on the node object so the ui can show the real value

This commit is contained in:
liamcottle
2024-04-07 20:29:02 +12:00
parent 7705220f68
commit 61de8736ab

View File

@ -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