Fixed FT8 call distances not hiding on Leaflet maps.

This commit is contained in:
Marat Fayzullin 2024-10-08 18:23:50 -04:00
parent c7a69e47c3
commit 82e801d7aa
1 changed files with 8 additions and 1 deletions

View File

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