Fix HTML and POI-Markers covering other markers if out of display-distance. Fixes: BlueMap#358

This commit is contained in:
Lukas Rieger (Blue) 2022-11-03 13:52:56 +01:00
parent 8173979ed8
commit 831d9185a2
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -53,9 +53,9 @@ export class HtmlMarker extends Marker {
onBeforeRender(renderer, scene, camera) {
if (this.fadeDistanceMax === Number.MAX_VALUE && this.fadeDistanceMin <= 0){
this.element.style.opacity = undefined;
this.element.parentNode.style.opacity = undefined;
} else {
this.element.style.opacity = Marker.calculateDistanceOpacity(this.position, camera, this.fadeDistanceMin, this.fadeDistanceMax).toString();
this.element.parentNode.style.opacity = Marker.calculateDistanceOpacity(this.position, camera, this.fadeDistanceMin, this.fadeDistanceMax).toString();
}
}