From 85382c7ae9fe89a499220db69ed2834b70815306 Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Wed, 12 Oct 2016 00:56:02 +0300 Subject: [PATCH] Prevent annoying map movements to keep line popup in view --- frontend/app/map/lines/lines.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/app/map/lines/lines.js b/frontend/app/map/lines/lines.js index dd3284b6..69042af7 100644 --- a/frontend/app/map/lines/lines.js +++ b/frontend/app/map/lines/lines.js @@ -115,7 +115,12 @@ }); $timeout(function() { $timeout(function() { // $compile only replaces variables on next digest + + // Prevent the map to scroll to the popup every time we move it and some more detail of the line gets loaded + var autoPanBkp = popup.options.autoPan; + popup.options.autoPan = false; popup.update(); + popup.options.autoPan = autoPanBkp; }); }); }, _makeLineMovable: function(line) {