fix max dist for ptracks

This commit is contained in:
Matthias Wirth
2024-08-13 21:03:32 +02:00
parent 442ec5ed47
commit 3515050f96

View File

@@ -1332,7 +1332,7 @@ PlaneObject.prototype.updatePositionData = function(now, last, data, init) {
if (this.position && SitePosition) {
if (pTracks && this.sitedist) {
this.sitedist = Math.max(ol.sphere.getDistance(SitePosition, this.position), this.sitedist);
} else if (!init) {
} else if (!init || pTracks) {
this.sitedist = ol.sphere.getDistance(SitePosition, this.position);
}
}