[Libreoffice-commits] online.git: 2 commits - loleaflet/src
Jan Holesovsky
kendy at collabora.com
Tue Jan 19 03:17:58 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 152a7bbb76137508b112f940150f475eec350dc7
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 16f9bb2..b5e78e3 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 3f35e2f3ade05cb453ea6cadd9802dec6a303ed7
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 d1caefd..16f9bb2 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