[Libreoffice-commits] online.git: loleaflet/spec loleaflet/src
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 25 10:26:57 UTC 2020
loleaflet/spec/tilebench/TileBenchSpec.js | 6 +++---
loleaflet/src/core/Log.js | 3 ---
loleaflet/src/core/Socket.js | 4 ++--
loleaflet/src/layer/tile/TileLayer.js | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 07461cbe69d38ec3d644830ab4784e3a20280435
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 24 19:49:36 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Mar 25 11:26:38 2020 +0100
Bin pointless global constant variables L.INCOMING and L.OUTGOING
They weren't even used consistenly instead of the literals 'INCOMING'
and 'OUTGOING'.
Change-Id: I70da22df669f8eaa5943b460e5b12b3cf100ca8e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91002
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/spec/tilebench/TileBenchSpec.js b/loleaflet/spec/tilebench/TileBenchSpec.js
index 85b44b28e..95014aaa3 100644
--- a/loleaflet/spec/tilebench/TileBenchSpec.js
+++ b/loleaflet/spec/tilebench/TileBenchSpec.js
@@ -42,7 +42,7 @@ describe('TileBench', function () {
if (msg.startsWith('tile')) {
msg += ' timestamp=' + now;
}
- L.Log.log(msg, L.OUTGOING, coords, now);
+ L.Log.log(msg, 'OUTGOING', coords, now);
this.socket.send(msg);
}, map._socket);
});
@@ -113,11 +113,11 @@ describe('TileBench', function () {
var logs = L.Log._logs;
for (var i = 0; i < logs.length; i++) {
if (logs[i].coords !== undefined) {
- if (logs[i].direction === L.INCOMING) {
+ if (logs[i].direction === 'INCOMING') {
logs[i].msg = logs[i].msg.replace(':', '');
incoming.push(logs[i]);
}
- else if (logs[i].direction === L.OUTGOING) {
+ else if (logs[i].direction === 'OUTGOING') {
logs[i].msg = logs[i].msg.replace('tilecombine','tile');
outgoing.push(logs[i]);
}
diff --git a/loleaflet/src/core/Log.js b/loleaflet/src/core/Log.js
index f0541346a..1ccb28a23 100644
--- a/loleaflet/src/core/Log.js
+++ b/loleaflet/src/core/Log.js
@@ -52,6 +52,3 @@ L.Log = {
this._logs = [];
}
};
-
-L.INCOMING = 'INCOMING';
-L.OUTGOING = 'OUTGOING';
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 498c49e28..68ba19a8c 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -152,7 +152,7 @@ L.Socket = L.Class.extend({
_doSend: function(msg, coords) {
// Only attempt to log text frames, not binary ones.
if (typeof msg === 'string') {
- L.Log.log(msg, L.OUTGOING, coords);
+ L.Log.log(msg, 'OUTGOING', coords);
this._logSocket('OUTGOING', msg);
}
@@ -759,7 +759,7 @@ L.Socket = L.Class.extend({
}
else if (!textMsg.startsWith('tile:') && !textMsg.startsWith('renderfont:') && !textMsg.startsWith('windowpaint:')) {
// log the tile msg separately as we need the tile coordinates
- L.Log.log(textMsg, L.INCOMING);
+ L.Log.log(textMsg, 'INCOMING');
if (imgBytes !== undefined) {
try {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 61a5b688b..46b3a4612 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1974,7 +1974,7 @@ L.TileLayer = L.GridLayer.extend({
}
tile.el.src = img;
}
- L.Log.log(textMsg, L.INCOMING, key);
+ L.Log.log(textMsg, 'INCOMING', key);
// Send acknowledgment, that the tile message arrived
var tileID = command.part + ':' + command.x + ':' + command.y + ':' + command.tileWidth + ':' + command.tileHeight + ':' + command.nviewid;
More information about the Libreoffice-commits
mailing list