[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - 2 commits - loleaflet/src
Jan Holesovsky
kendy at collabora.com
Tue Jan 19 03:17:00 PST 2016
loleaflet/src/layer/tile/CalcTileLayer.js | 5 ++---
loleaflet/src/layer/tile/ImpressTileLayer.js | 5 ++---
loleaflet/src/layer/tile/WriterTileLayer.js | 3 +++
3 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit bb96386735844f0c19d77a910554ad5489adb6ca
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Jan 19 11:45:51 2016 +0100
loleaflet: No need to ask for tiles for non-current parts.
LibreOffice may trigger invalidation of a part that is not current (eg. during
the part switch). But as we don't need the old data, discard such requests.
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index a993db6..061eaa1 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -69,7 +69,7 @@ L.CalcTileLayer = L.TileLayer.extend({
}
}
- if (needsNewTiles)
+ if (needsNewTiles && command.part === this._selectedPart)
{
var message = 'tilecombine ' +
'part=' + command.part + ' ' +
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 4bb1e9f..1969bd6 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -60,7 +60,7 @@ L.ImpressTileLayer = L.TileLayer.extend({
}
}
- if (needsNewTiles)
+ if (needsNewTiles && command.part === this._selectedPart)
{
var message = 'tilecombine ' +
'part=' + command.part + ' ' +
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js
index 31be837..5fdcb25 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -63,6 +63,9 @@ L.WriterTileLayer = L.TileLayer.extend({
if (needsNewTiles)
{
+ // CalcTileLayer.js and ImpressTileLayer.js avoid this when
+ // command.part !== this._selectedPart; but in Writer, the part is
+ // always 0 anyway
var message = 'tilecombine ' +
'part=' + command.part + ' ' +
'width=' + this._tileSize + ' ' +
commit f029a13a6af4b44ac1bab1f32cccd328efdf11d0
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Jan 19 09:09:04 2016 +0100
loleaflet: Share code for updating the parts.
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 0d8167e..a993db6 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -112,8 +112,7 @@ L.CalcTileLayer = L.TileLayer.extend({
_onSetPartMsg: function (textMsg) {
var part = parseInt(textMsg.match(/\d+/g)[0]);
if (part !== this._selectedPart) {
- this._selectedPart = part;
- this._update();
+ this._map.setPart(part);
this._map.fire('setpart', {selectedPart: this._selectedPart});
this._map._socket.sendMessage('commandvalues command=.uno:ViewRowColumnHeaders');
}
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 6505f6d..4bb1e9f 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -108,8 +108,7 @@ L.ImpressTileLayer = L.TileLayer.extend({
_onSetPartMsg: function (textMsg) {
var part = parseInt(textMsg.match(/\d+/g)[0]);
if (part !== this._selectedPart) {
- this._selectedPart = part;
- this._update();
+ this._map.setPart(part);
this._map.fire('setpart', {selectedPart: this._selectedPart});
}
},
More information about the Libreoffice-commits
mailing list