[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 8 20:15:19 UTC 2018


 loleaflet/src/control/Control.DocumentRepair.js |    2 +-
 loleaflet/src/control/Control.Layers.js         |    2 +-
 loleaflet/src/control/Control.PartsPreview.js   |    2 +-
 loleaflet/src/control/Control.Permission.js     |    2 +-
 loleaflet/src/control/Control.Selection.js      |    2 +-
 loleaflet/src/control/Control.Tabs.js           |    2 +-
 loleaflet/src/control/Control.js                |    4 ----
 7 files changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 4dbec80ffdc3c3f81b52e434e1c6e611a976b104
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Sun Aug 5 16:50:25 2018 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Wed Aug 8 16:14:52 2018 -0400

    loleaflet: mobile: replace refocusOnMap with map focus
    
    Change-Id: I271ea3a3ed22320b1184e1bfc348ecb69f681fd8

diff --git a/loleaflet/src/control/Control.DocumentRepair.js b/loleaflet/src/control/Control.DocumentRepair.js
index 6ed2d8bda..9d67e031a 100644
--- a/loleaflet/src/control/Control.DocumentRepair.js
+++ b/loleaflet/src/control/Control.DocumentRepair.js
@@ -119,7 +119,7 @@ L.Control.DocumentRepair = L.Control.extend({
 
 	_onCloseClick: function () {
 		this._map.enable(true);
-		this._refocusOnMap();
+		this._map.focus();
 		this.remove();
 	},
 
diff --git a/loleaflet/src/control/Control.Layers.js b/loleaflet/src/control/Control.Layers.js
index 1686b80c8..3963976a4 100644
--- a/loleaflet/src/control/Control.Layers.js
+++ b/loleaflet/src/control/Control.Layers.js
@@ -239,7 +239,7 @@ L.Control.Layers = L.Control.extend({
 
 		this._handlingClick = false;
 
-		this._refocusOnMap();
+		this._map.focus();
 	},
 
 	_expand: function () {
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index c9dd0dc80..c5b24729c 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -77,7 +77,7 @@ L.Control.PartsPreview = L.Control.extend({
 			.on(img, 'click', L.DomEvent.stopPropagation)
 			.on(img, 'click', L.DomEvent.stop)
 			.on(img, 'click', this._setPart, this)
-			.on(img, 'click', this._refocusOnMap, this);
+			.on(img, 'click', this._map.focus, this._map);
 
 		var topBound = this._previewContTop;
 		var previewFrameTop = 0;
diff --git a/loleaflet/src/control/Control.Permission.js b/loleaflet/src/control/Control.Permission.js
index 96c59de7a..3900c5b43 100644
--- a/loleaflet/src/control/Control.Permission.js
+++ b/loleaflet/src/control/Control.Permission.js
@@ -27,7 +27,7 @@ L.Control.PermissionSwitch = L.Control.extend({
 		else {
 			this._map.setPermission('view');
 		}
-		this._refocusOnMap();
+		this._map.focus();
 	},
 
 	_onUpdatePermission: function (e) {
diff --git a/loleaflet/src/control/Control.Selection.js b/loleaflet/src/control/Control.Selection.js
index 766455f65..fccd83f43 100644
--- a/loleaflet/src/control/Control.Selection.js
+++ b/loleaflet/src/control/Control.Selection.js
@@ -27,7 +27,7 @@ L.Control.Selection = L.Control.extend({
 		else {
 			this._map.disableSelection();
 		}
-		this._refocusOnMap();
+		this._map.focus();
 	},
 
 	_onUpdatePermission: function (e) {
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 6d53bff86..73e43b8d6 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -128,7 +128,7 @@ L.Control.Tabs = L.Control.extend({
 						.on(tab, 'click', L.DomEvent.stopPropagation)
 						.on(tab, 'click', L.DomEvent.stop)
 						.on(tab, 'click', this._setPart, this)
-						.on(tab, 'click', this._refocusOnMap, this);
+						.on(tab, 'click', this._map.focus, this._map);
 					this._spreadsheetTabs[id] = tab;
 				}
 			}
diff --git a/loleaflet/src/control/Control.js b/loleaflet/src/control/Control.js
index 466689d31..af8df09d8 100644
--- a/loleaflet/src/control/Control.js
+++ b/loleaflet/src/control/Control.js
@@ -78,10 +78,6 @@ L.Control = L.Class.extend({
 		}
 		var corner = this._map._controlCorners[this.options.position];
 		return corner.hasChildNodes();
-	},
-
-	_refocusOnMap: function () {
-		this._map.focus();
 	}
 });
 


More information about the Libreoffice-commits mailing list