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

László Németh laszlo.nemeth at collabora.com
Wed Sep 21 11:27:45 UTC 2016


 loleaflet/src/layer/tile/TileLayer.js     |   11 +++++++++++
 loleaflet/src/map/handler/Map.Keyboard.js |    5 +++++
 2 files changed, 16 insertions(+)

New commits:
commit 165ab830efd77914278075dd598dfa3386af10cc
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Wed Sep 21 13:26:02 2016 +0200

    add Ctrl-Shift-Alt-d shortcut to tile debugging mode

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 5f099b6..1c2f2cc 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -387,6 +387,17 @@ L.TileLayer = L.GridLayer.extend({
 		else if (textMsg.startsWith('graphicviewselection:')) {
 			this._onGraphicViewSelectionMsg(textMsg);
 		}
+		else if (textMsg.startsWith('tiledebuggingmode:')) {
+			this._invalidateClientVisibleArea();
+			this._debug = !this._debug;
+			if (this._debug) {
+				if (!this._debugInfo) {
+					this._debugInfo = new L.LayerGroup();
+					map.addLayer(this._debugInfo);
+				}
+				this._onMessage('invalidatetiles: EMPTY', null);
+			}
+		}
 	},
 
 	_onCommandValuesMsg: function (textMsg) {
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index e75ffed..9835846 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -386,6 +386,11 @@ L.Map.Keyboard = L.Handler.extend({
 					this._map._socket.sendMessage('uno .uno:InsertEndnote');
 					return true;
 				}
+			} else if (e.originalEvent.altKey) {
+				switch (e.originalEvent.keyCode) {
+				case 68: // Ctrl + Shift + Alt + d for tile debugging mode
+					this._map._docLayer._onMessage('tiledebuggingmode:', null);
+				}
 			}
 
 			return false;


More information about the Libreoffice-commits mailing list