From 82e801d7aaceb027b81ff9bf519d807c27dba21a Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Tue, 8 Oct 2024 18:23:50 -0400 Subject: [PATCH] Fixed FT8 call distances not hiding on Leaflet maps. --- htdocs/lib/Leaflet.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/Leaflet.js b/htdocs/lib/Leaflet.js index 18e56c52..771206cb 100644 --- a/htdocs/lib/Leaflet.js +++ b/htdocs/lib/Leaflet.js @@ -143,13 +143,20 @@ LCall.prototype.setEnds = function(lat1, lon1, lat2, lon2) { LCall.prototype.setColor = function(color) { this._line.setStyle({ color: color }); + // Leaflet.Geodesic does not provide its own setStyle method, it + // just passes it to Leaflet's polyline. Thus, we need to update + // the textNode to reflect changes. + if (this._line._textNode) this._line._textNode.style.color = color; }; LCall.prototype.setOpacity = function(opacity) { this._line.setStyle({ opacity: opacity }); + // Leaflet.Geodesic does not provide its own setStyle method, it + // just passes it to Leaflet's polyline. Thus, we need to update + // the textNode to reflect changes. + if (this._line._textNode) this._line._textNode.style.opacity = opacity; }; - // // Position object //