Bugfix: TrackAnalysis selected edges lingered after route deletion

This commit is contained in:
Tobias 2022-11-05 20:05:40 +01:00
parent 260f34521e
commit 8b311b1add

View file

@ -91,6 +91,14 @@ BR.TrackAnalysis = L.Class.extend({
if (segments.length === 0) { if (segments.length === 0) {
$('#track_statistics').html(''); $('#track_statistics').html('');
if (this.highlightedSegments) {
this.map.removeLayer(this.highlightedSegments);
this.highlightedSegments = null;
}
if (this.highlightedSegment) {
this.map.removeLayer(this.highlightedSegment);
this.highlightedSegment = null;
}
return; return;
} }