[Libreoffice-commits] online.git: loleaflet/src
Jan Holesovsky
kendy at collabora.com
Fri Jan 20 12:20:25 UTC 2017
loleaflet/src/layer/tile/TileLayer.js | 10 ++++++++--
loleaflet/src/map/Map.js | 5 +++++
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit fbf3249fce9a05613fa78162de4dba81f2eaf96b
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Jan 20 13:18:45 2017 +0100
Debug console: Add a setting to disable going to inactive state.
Combined with the automatic typing, very useful for testing with many users
connected.
Change-Id: Ia3dd9ff59b81849a740d65e8e1ee8ce9918ce843
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 0e75eaa..b45e0f6 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1973,18 +1973,22 @@ L.TileLayer = L.GridLayer.extend({
}
this._debugInfo = new L.LayerGroup();
this._debugInfo2 = new L.LayerGroup();
+ this._debugAlwaysActive = new L.LayerGroup();
this._debugTyper = new L.LayerGroup();
map.addLayer(this._debugInfo);
map.addLayer(this._debugInfo2);
var overlayMaps = {
'Tile overlays': this._debugInfo,
'Screen overlays': this._debugInfo2,
+ 'Always active': this._debugAlwaysActive,
'Typing': this._debugTyper
};
L.control.layers({}, overlayMaps, {collapsed: false}).addTo(map);
this._map.on('layeradd', function(e) {
- if (e.layer === this._debugTyper) {
+ if (e.layer === this._debugAlwaysActive) {
+ map._debugAlwaysActive = true;
+ } else if (e.layer === this._debugTyper) {
this._debugTypeTimeout();
} else if (e.layer === this._debugInfo2) {
for (var i = 0; i < this._debugDataNames.length; i++) {
@@ -1993,7 +1997,9 @@ L.TileLayer = L.GridLayer.extend({
}
}, this);
map.on('layerremove', function(e) {
- if (e.layer === this._debugTyper) {
+ if (e.layer === this._debugAlwaysActive) {
+ map._debugAlwaysActive = false;
+ } else if (e.layer === this._debugTyper) {
clearTimeout(this._debugTypeTimeoutId);
} else if (e.layer === this._debugInfo2) {
for (var i in this._debugData) {
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 65efab7..a6060f0 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -70,6 +70,7 @@ L.Map = L.Evented.extend({
this._active = true;
this._fatal = false;
this._enabled = true;
+ this._debugAlwaysActive = false; // disables the dimming / document inactivity when true
vex.dialogID = -1;
@@ -773,6 +774,10 @@ L.Map = L.Evented.extend({
},
_dim: function() {
+ if (this._debugAlwaysActive === true) {
+ return;
+ }
+
console.debug('_dim:');
if (!this._socket.connected()) {
return;
More information about the Libreoffice-commits
mailing list