From 89b987fc874f6b4c690977917c1d00d30dc24f67 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 3 Mar 2022 01:24:32 -0800 Subject: [PATCH] Stop fetching timing info for unselected flights. The flight will be redrawn when it's selected. Don't bother fetching this info for flights that aren't selected. --- resources/ui/map/map.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/ui/map/map.js b/resources/ui/map/map.js index 69ebeb17..e46abfe3 100644 --- a/resources/ui/map/map.js +++ b/resources/ui/map/map.js @@ -714,11 +714,13 @@ class Waypoint { }); }); - this.description(false).then((description) => - marker.bindTooltip(description, { - permanent: zoom >= SHOW_WAYPOINT_INFO_AT_ZOOM, - }) - ); + if (this.flight.selected) { + this.description(false).then((description) => + marker.bindTooltip(description, { + permanent: zoom >= SHOW_WAYPOINT_INFO_AT_ZOOM, + }) + ); + } return marker; }