From 60f19d65c1129b38cb982e5703231f9c1f5f3153 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Mon, 1 Apr 2024 14:03:43 +1300 Subject: [PATCH] show online nodes above offline, but without needing to use separate layer groups --- src/public/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/public/index.html b/src/public/index.html index a932f0e..0c0f19f 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -1967,6 +1967,8 @@ var marker = L.marker([node.latitude, node.longitude], { icon: icon, tagName: node.node_id, + // we want to show online nodes above offline, but without needing to use separate layer groups + zIndexOffset: node.mqtt_connection_state === "online" ? 1000 : -1000, }).on('click', function(event) { // close tooltip on click to prevent tooltip and popup showing at same time event.target.closeTooltip();