From 80f3857f446a149bd4adb1fdbcfb5d48ce670a94 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 19 May 2021 20:49:51 -0700 Subject: [PATCH] Stop forcing open CP tooltips. These obscure the TGOs around them. Easy enough to mouse over, and the names aren't the important part. --- resources/ui/map/map.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/resources/ui/map/map.js b/resources/ui/map/map.js index 6329eb76..af3fe91f 100644 --- a/resources/ui/map/map.js +++ b/resources/ui/map/map.js @@ -210,8 +210,6 @@ function recenterMap(center) { map.setView(center, 8, { animate: true, duration: 1 }); } -const SHOW_BASE_NAME_AT_ZOOM = 8; - class ControlPoint { constructor(cp) { this.cp = cp; @@ -299,13 +297,10 @@ class ControlPoint { attachTooltipsAndHandlers(dragging = false) { this.detachTooltipsAndHandlers(); - const zoom = map.getZoom(); const locationMarker = this.locationMarker(dragging); const destinationMarker = this.destinationMarker(); locationMarker - .bindTooltip(`

${this.cp.name}

`, { - permanent: zoom >= SHOW_BASE_NAME_AT_ZOOM, - }) + .bindTooltip(`

${this.cp.name}

`) .on("click", () => { this.cp.showInfoDialog(); }) @@ -740,5 +735,4 @@ function setTooltipZoomThreshold(layerGroup, showAt) { }); } -setTooltipZoomThreshold(controlPointsLayer, SHOW_BASE_NAME_AT_ZOOM); setTooltipZoomThreshold(selectedFlightPlansLayer, SHOW_WAYPOINT_INFO_AT_ZOOM);