From d78bad959e415bee9c38d5a5c461587aef3ea761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= Date: Tue, 30 Aug 2022 10:32:20 +0300 Subject: [PATCH] Stop follow user feature if a key has been pressed by the original user. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gülşah Köse Change-Id: Ibfd160fd8fb80a9dfd4c71dfb9a4a2725be48465 --- browser/src/control/Control.UIManager.js | 3 ++- browser/src/map/handler/Map.Keyboard.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/browser/src/control/Control.UIManager.js b/browser/src/control/Control.UIManager.js index f49808685..88ad98034 100644 --- a/browser/src/control/Control.UIManager.js +++ b/browser/src/control/Control.UIManager.js @@ -96,7 +96,8 @@ L.Control.UIManager = L.Control.extend({ this.map.addControl(this.map.dialog); this.map.addControl(L.control.contextMenu()); this.map.addControl(L.control.infobar()); - this.map.addControl(L.control.userList()); + this.map.userList = L.control.userList(); + this.map.addControl(this.map.userList); var openBusyPopup = function(label) { this.busyPopupTimer = setTimeout(function() { diff --git a/browser/src/map/handler/Map.Keyboard.js b/browser/src/map/handler/Map.Keyboard.js index bf43d8dc3..81b27907b 100644 --- a/browser/src/map/handler/Map.Keyboard.js +++ b/browser/src/map/handler/Map.Keyboard.js @@ -454,6 +454,12 @@ L.Map.Keyboard = L.Handler.extend({ } } + // if any key is pressed, we stop the following other user feature. + if (this._map._docLayer._followUser) { + this._map.userList.followUser(this._map._docLayer._viewId); + } + + L.DomEvent.stopPropagation(ev); },