From 88880813ee40ceaa589bce9fa292fd525bbfef17 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 7 Aug 2015 18:53:12 +0200 Subject: [PATCH] Phi: fix "center on aircraft" Correctly pan to aircraft when mode gets re-enabled even if aircraft is not moving --- Phi/widgets/map.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Phi/widgets/map.js b/Phi/widgets/map.js index 246c3636a..71ffd5237 100644 --- a/Phi/widgets/map.js +++ b/Phi/widgets/map.js @@ -48,6 +48,9 @@ define( self.toggleFollowAircraft = function(a) { self.followAircraft(!self.followAircraft()); + if( self.followAircraft() ) { + self.map.setView(self.mapCenter()); + } } self.altitude = ko.observable(0).extend({